Convert CURL commands to Objective-C code online

Curl command

Examples: GET - POST - JSON - Basic Auth - Files - Form

CURL to Objective-C online

This tool helps you to generate Objective-C code based on CURL command. Copy and paste CURL command and generate Objective-C.

What can you do with CURL to Objective-C converter online?

  • CURL to Objective-C is very unique tool to convert CURL command to Objective-C request of Objective-C. The input provide by the user's CURL command to generate Objective-C code.
  • This tool saves your time and helps to generate Objective-C code with ease.
  • CURL to Objective-C works well on Windows, MAC, Linux, Chrome, Firefox, Edge and Safari.

what is CURL?

CURL is an open-source command line tool that downloads files from the web. It supports a variety of protocols, including Objective-C, Objective-CS, FTP, SFTP, TFTP, Gopher and others.

How do convert CURL to Objective-C code? 

Step1: Paste and convert your CURL requests to Objective-C code

Step2: Copy Objective-C code

Convert CURL to Objective-C example

CURL
curl example.com
Objective-C
#import <Foundation/Foundation.h>

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com/"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];