K kostefar Active Member Licensed User Longtime User Nov 4, 2017 #1 Dear All, I´m trying to imitate a login session for a website, and one of the packets has a header that looks like this: OPTIONS https://bla.bla.bla/bla/bla/bla/bla...5425703585&clientProtocol=1.3&_=1509804256775 HTTP/1.1 where other packets are sent with PUT, GET and POST. Any idea how to do this with OkhttpUtils2? Thanks in advance!
Dear All, I´m trying to imitate a login session for a website, and one of the packets has a header that looks like this: OPTIONS https://bla.bla.bla/bla/bla/bla/bla...5425703585&clientProtocol=1.3&_=1509804256775 HTTP/1.1 where other packets are sent with PUT, GET and POST. Any idea how to do this with OkhttpUtils2? Thanks in advance!
nwhitfield Active Member Licensed User Longtime User Nov 4, 2017 #2 The OPTIONS header usually just gets information about a resource, rather than actually being part of a transaction. Presumably you're getting the packets by snooping on an existing app or service? I would hazard a guess that it's using OPTIONS to allow whatever's talking to the server to determine something like which version of a protocol or server is being used, and if it got some other response, then it would be amending the subsequent data packets appropriately. So, in the absence of having full documentation of the protocol, I would think you can probably omit the OPTIONS request, and simply build your code around the other data sent and received. Of course, if it's using OPTIONS as part of a CORS request ( https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS ) things might be slightly different. Upvote 0
The OPTIONS header usually just gets information about a resource, rather than actually being part of a transaction. Presumably you're getting the packets by snooping on an existing app or service? I would hazard a guess that it's using OPTIONS to allow whatever's talking to the server to determine something like which version of a protocol or server is being used, and if it got some other response, then it would be amending the subsequent data packets appropriately. So, in the absence of having full documentation of the protocol, I would think you can probably omit the OPTIONS request, and simply build your code around the other data sent and received. Of course, if it's using OPTIONS as part of a CORS request ( https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS ) things might be slightly different.
K kostefar Active Member Licensed User Longtime User Nov 4, 2017 #3 Cheers nwhitfield, I´ll see if my app can live without it Upvote 0