Latest 3.0.2
License MIT
Platforms ios 5.0, osx 10.7, requires ARC
Frameworks Foundation
Authors ,

:warning: :warning: :warning: JXHTTP IS NO LONGER BEING ACTIVELY MAINTAINED. We will be phasing it out of TMTumblrSDK

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 [email protected] with questions.

Latest podspec

    "name": "JXHTTP",
    "version": "3.0.2",
    "source_files": "JXHTTP/*.{h,m}",
    "homepage": "",
    "summary": "Networking for iOS and OS X.",
    "authors": {
        "Justin Ouellette": "[email protected]",
        "Bryan Irace": "[email protected]"
    "source": {
        "git": "",
        "tag": "3.0.2"
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    "requires_arc": true,
    "frameworks": "Foundation",
    "ios": {
        "weak_frameworks": "UIKit"
    "osx": {
        "weak_frameworks": "AppKit"
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"

Pin It on Pinterest

Share This