문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top