Skip to content

Instantly share code, notes, and snippets.

@toranb
Created April 11, 2011 00:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toranb/912881 to your computer and use it in GitHub Desktop.
Save toranb/912881 to your computer and use it in GitHub Desktop.
HttpWithObjectiveCViewController.m
[request setValue:@"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" forHTTPHeaderField:@"Accept"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[request setValue:[NSString stringWithFormat:@"%d", [requestData length]] forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody: requestData];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment