Akbar
Akbar

Reputation: 1499

What are the list of attributes can be set to forHTTPHeaderField in NSMutableURLRequest

We can set the User-Agent for the request as mentioned below,

   NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];
   [request setValue:userAgent forHTTPHeaderField:@"User-Agent"];

I can set content-Type and content-lenght,I know these attributes only,what else i can pass,I did not find the documentation.I want to know all the list of attributes that for forHTTPHeaderField.Please share any link if any one has.

Upvotes: 1

Views: 190

Answers (1)

Grady Player
Grady Player

Reputation: 14539

The standard headers are explained http://en.m.wikipedia.org/wiki/List_of_HTTP_header_fields and http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

But you can certainly set any value that the server wants to see including user defined information.

Upvotes: 1

Related Questions