Created
December 5, 2009 18:54
-
-
Save ejknapp/249806 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // How to create a POST request to the Flak server | |
| NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | |
| [request setHTTPMethod:@"POST"]; | |
| [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; | |
| [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; | |
| NSData *data = [jsonStringForSession dataUsingEncoding:NSISOLatin2StringEncoding]; | |
| [request setHTTPBody:data]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment