explaingit

pokeb/asi-http-request

5,734Objective-CAudience · developerComplexity · 2/5Setup · moderate

TLDR

ASIHTTPRequest is a legacy Objective-C HTTP library for iOS and Mac OS X that wraps Apple's CFNetwork API to simplify networking, file uploads, caching, and authentication.

Mindmap

mindmap
  root((ASIHTTPRequest))
    What it does
      HTTP requests wrapper
      CFNetwork simplifier
      iOS and Mac OS X
    Request types
      GET POST PUT DELETE
      Multipart file upload
      S3 and Cloud Files
    Features
      Progress indicators
      Caching offline mode
      Auth Basic Digest NTLM
    Status
      Legacy Objective-C
      Pre-NSURLSession era
      No longer maintained
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Make GET and POST HTTP requests from an Objective-C iOS or Mac app without writing CFNetwork boilerplate.

USE CASE 2

Upload a file from an iOS device using multipart/form-data, matching how an HTML file input works.

USE CASE 3

Cache HTTP responses so parts of an iOS app work offline when there is no network connection.

USE CASE 4

Authenticate with a web service using Basic, Digest, or NTLM and store credentials in the iOS Keychain.

Tech stack

Objective-CCFNetworkiOSMac OS X

Getting it running

Difficulty · moderate Time to first run · 30min

Legacy library not compatible with Swift projects or modern dependency managers, add source files manually to an Objective-C project.

The README does not mention a license. Check the repository directly.

In plain English

ASIHTTPRequest is an Objective-C networking library for iOS and Mac OS X applications. It wraps Apple's lower-level CFNetwork API to make HTTP communication easier to write and manage. The library predates modern Apple networking tools (like NSURLSession) and was widely used during the early iOS development era. The library handles the full range of HTTP operations: GET, POST, PUT, and DELETE requests. A companion class called ASIFormDataRequest handles multipart form submissions, making it straightforward to upload files from an iOS or Mac app the same way an HTML form would. Downloads can be written directly to disk rather than held in memory, which matters when fetching large files on devices with limited RAM. Feature highlights include progress tracking for both uploads and downloads through native Apple progress controls, authentication support for Basic, Digest, and NTLM schemes with optional Keychain storage so credentials persist across sessions, cookie handling, GZIP compression, and bandwidth throttling. The library also includes ASIDownloadCache, which transparently caches server responses and lets cached pages load even when there is no network connection. On iOS 4 and later, requests can continue running after the user switches away from the app. The library supports both synchronous and asynchronous request patterns and, on iOS 4 and Mac OS X 10.6, can notify about request state changes using blocks rather than delegate callbacks. Dedicated support classes exist for Amazon S3 and Rackspace Cloud Files storage. The library targets Mac OS X 10.5 or later and iOS 3.0 or later. It comes with a unit test suite. The README does not mention a license. Note: this library is from the early iOS era and is no longer actively maintained, most modern iOS projects use NSURLSession or libraries built on top of it.

Copy-paste prompts

Prompt 1
Show me how to make an asynchronous GET request using ASIHTTPRequest in Objective-C and parse the JSON response when it finishes.
Prompt 2
I need to upload an image file from iOS to a server using multipart/form-data with ASIFormDataRequest. Write the Objective-C code.
Prompt 3
How do I set up ASIDownloadCache in my iOS app so that responses are cached and the app can show content when offline?
Prompt 4
Write Objective-C code using ASIHTTPRequest to authenticate with a REST API using HTTP Basic Auth and store the credentials in the Keychain.
Open on GitHub → Explain another repo

← pokeb on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.