I need to send request to my server without http headers with NSMutableURLRequest and NSMutableURLConnection. I found this to remove content of header [request setValue:@"" forHTTPHeaderField:@"User-Agent"];
, but I need to delete all header.
Now:
GET / HTTP/1.1
Host: 127.0.0.1:5555
Accept: */*
Accept-Language: en-us
Connection: keep-alive
Accept-Encoding: gzip, deflate
User-Agent:
Need:
Custom text like "Hello"
Code:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];