Domanda

I have seen quite some examples for http requests, and the most use the setValue: method. But in my code it seems not to be necessary.

Im curious if it's really required, or does it depend on the server the object is communication with?

Thanks for any insight.

È stato utile?

Soluzione

Short answer no. Long answer is it depends on what your doing with your requests. For example if I am communicating with Github then I add "Basic {BASE64_ENCODED_HASH}" for authentication in the "authorization" http header field. The services you work with may require something that requires you to use it, but for basic requests it is not necessary.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top