I need to add authorization code and id in the header field and serial no as a parameter as a HEAD request to the server. Sorry for the dumb question, I am very new to Objective C.
Asked
Active
Viewed 842 times
1 Answers
1
You can use this code as an example:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]];
[request setHTTPMethod:@"HEAD"];
[request setValue:@"123" forHTTPHeaderField:@"ID"];
//Other parameters like this
[NSURLSession sessionWithConfiguration:...

Hussain Mansoor
- 2,934
- 2
- 27
- 40