Inherits from AFHTTPRequestOperation
Declared in RKHTTPRequestOperation.h

Overview

The RKHTTPRequestOperation class is a subclass of AFHTTPRequestOperation for HTTP or HTTPS requests made by RestKit. It provides per-instance configuration of the acceptable status codes and content types and integrates with the RKLog system to provide detailed requested and response logging. Instances of RKHTTPRequest are created by RKObjectRequestOperation and its subclasses to HTTP requests that will be object mapped. When used to make standalone HTTP requests, RKHTTPRequestOperation instance behave identically to AFHTTPRequestOperation with the exception of emitting logging information.

Tasks

Configuring Acceptable Status Codes and Content Types

  •   acceptableStatusCodes

    The set of status codes which the operation considers successful.

    property
  •   acceptableContentTypes

    The set of content types which the operation considers successful.

    property
  •   wasNotModified

    Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

    property

Properties

acceptableContentTypes

The set of content types which the operation considers successful.

@property (nonatomic, strong) NSSet *acceptableContentTypes

Discussion

The set may contain NSString or NSRegularExpression objects. When nil, the acceptability of content types is deferred to the superclass implementation.

Default: nil

Declared In

RKHTTPRequestOperation.h

acceptableStatusCodes

The set of status codes which the operation considers successful.

@property (nonatomic, strong) NSIndexSet *acceptableStatusCodes

Discussion

When nil, the acceptability of status codes is deferred to the superclass implementation.

Default: nil

Declared In

RKHTTPRequestOperation.h

wasNotModified

Whether the response received a 304 response, whether via the initial request, or by virtue of cache revalidation occurring from NSURLCache.

@property (nonatomic, readonly) BOOL wasNotModified

Declared In

RKHTTPRequestOperation.h