0

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.

basic ios
  • 1
  • 1

1 Answers1

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