Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
networking for iOS and OS X
Objective-C Other
branch: master

Merge pull request #10 from jstn/fix-conversion-warnings

Attempt to fix a bunch of conversion warnings
latest commit 2656f9425d
@irace irace authored
Failed to load latest commit information.
JXHTTP Inline function
docs common modes
example example update
.gitignore messing with gitignore
.nojekyll gh-pages changelog
CNAME gh-pages
JXHTTP.podspec Version bump
LICENSE.txt license file extension readme updates
index.html gh-pages
reset.css gh-pages


JXHTTP is a networking library for iOS and OS X. It leverages operation queues and GCD to provide a powerful wrapper for Cocoa's built-in NSURLConnection object, adding many useful features like block response objects and progress tracking across multiple requests. It strives to be as lightweight and readable as possible, making it easy to use or customize for advanced behavior.

To get started, simply download the latest tag and drop the JXHTTP folder into your Xcode project. There are zero external dependencies or special compiler flags, just #import "JXHTTP.h" somewhere convenient. A complete docset is included for use in Xcode or Dash, and available online at JXHTTP is also available as a CocoaPod.

JXHTTP requires iOS 5.0 or OS X 10.7 or newer.


JXHTTPOperation offers a number of advantages over using vanilla NSURLConnection without an operation wrapper:

  • requests can be easily grouped, prioritized, cancelled, and executed concurrently
  • data can be streamed to and from disk for excellent memory efficiency
  • requests can optionally continue executing when the app is sent to the background
  • progress is easily tracked via delegate methods, response blocks, KVO, or all three
  • requests run entirely on background threads, away from the main thread and UI
  • particular attention has been paid to thread safety and is well-documented throughout

JXHTTP is production-ready and currently powers the Tumblr SDK; thousands of successful requests were performed while you read this paragraph!


See the included example project for a real-world use case in iOS.


JXHTTPOperation *op = [JXHTTPOperation withURLString:@""];
op.didFinishLoadingBlock = ^(JXHTTPOperation *op) {
    NSLog(@"%@", op.responseString);

[[JXHTTPOperationQueue sharedQueue] addOperation:op];


JXHTTPOperation *op = [JXHTTPOperation withURLString:@""];
[op startAndWaitUntilFinished];

NSLog(@"%@", op.responseString);


NSURL *postURL = [NSURL URLWithString:@""];
NSDictionary *postParams = @{ @"make": @"Ferrari", @"model": @"458 Italia" };

JXHTTPOperation *op = [[JXHTTPOperation alloc] initWithURL:postURL];
op.requestBody = [[JXHTTPFormEncodedBody alloc] initWithDictionary:postParams];
op.requestCachePolicy = NSURLRequestReloadIgnoringLocalAndRemoteCacheData;
op.responseDataFilePath = @"/tmp/downloaded_data";
op.trustedHosts = @[ ];
op.performsBlocksOnMainQueue = YES;

op.didSendDataBlock = ^(JXHTTPOperation *op) {
    NSLog(@"%lld bytes uploaded so far", op.bytesUploaded);

[[JXHTTPOperationQueue sharedQueue] addOperation:op];


JXHTTP was created by Justin Ouellette.

Email with questions.

Something went wrong with that request. Please try again.