Inherits from NSObject
Conforms to RKRequestSerializable
Declared in RKRequestSerialization.h
RKRequestSerialization.m

Overview

A simple implementation of the RKRequestSerializable protocol suitable for wrapping a MIME Type string and HTTP Body into a format that can be sent as the params of an RKRequest.

Tasks

Creating a Serialization

Properties

  •   data

    Returns the data enclosed in this serialization.

    property
  •   MIMEType

    Returns the MIME type of the data in this serialization.

    property

HTTP Headers

Properties

MIMEType

Returns the MIME type of the data in this serialization.

@property (nonatomic, readonly) NSString *MIMEType

Declared In

RKRequestSerialization.h

data

Returns the data enclosed in this serialization.

@property (nonatomic, readonly) NSData *data

Declared In

RKRequestSerialization.h

Class Methods

serializationWithData:MIMEType:

Creates and returns a new serialization enclosing an NSData object with the specified MIME type.

+ (id)serializationWithData:(NSData *)data MIMEType:(NSString *)MIMEType

Parameters

data

An NSData object to initialize the serialization with.

MIMEType

A string of the MIME type of the provided data.

Return Value

An autoreleased RKRequestSerialization object with the data and MIME type set.

Declared In

RKRequestSerialization.h

Instance Methods

HTTPBody

An NSData representing the HTTP Body serialization of the object implementing the protocol.

- (NSData *)HTTPBody

Return Value

An NSData object respresenting the HTTP body serialization.

Declared In

RKRequestSerializable.h

HTTPHeaderValueForContentLength

Returns the length of the HTTP Content-Length header.

- (NSUInteger)HTTPHeaderValueForContentLength

Return Value

Unsigned integer length of the HTTP Content-Length header.

Declared In

RKRequestSerializable.h

HTTPHeaderValueForContentType

The value of the Content-Type header for the HTTP Body representation of the serialization.

- (NSString *)HTTPHeaderValueForContentType

Return Value

A string value of the Content-Type header for the HTTP body.

Declared In

RKRequestSerializable.h

initWithData:MIMEType:

Returns a new serialization enclosing an NSData object with the specified MIME type.

- (id)initWithData:(NSData *)data MIMEType:(NSString *)MIMEType

Parameters

data

An NSData object to initialize the serialization with.

MIMEType

A string of the MIME type of the provided data.

Return Value

An RKRequestSerialization object with the data and MIME type set.

Declared In

RKRequestSerialization.h