Files
RestKit/Code/ObjectMapping/RKHTTPUtilities.h
Jawwad Ahmad 8cbdb5f7ed Trailing whitespace cleanup from files in the Code directory.
Used the following command from within the Code dir:
git ls-files *.m *.h *.json | xargs /usr/bin/sed -i '' -E 's/[[:space:]]*$//'
2012-09-02 12:51:45 -04:00

60 lines
1.6 KiB
Objective-C

//
// RKHTTPUtilities.h
// RestKit
//
// Created by Blake Watters on 8/24/12.
// Copyright (c) 2012 RestKit. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
HTTP methods for requests
*/
typedef enum RKRequestMethod {
RKRequestMethodInvalid = -1,
RKRequestMethodGET,
RKRequestMethodPOST,
RKRequestMethodPUT,
RKRequestMethodDELETE,
RKRequestMethodHEAD,
RKRequestMethodPATCH
} RKRequestMethod;
NSString *RKStringFromRequestMethod(RKRequestMethod);
RKRequestMethod RKRequestMethodFromString(NSString *);
/**
The HTTP status code classes
See http://tools.ietf.org/html/rfc2616#section-10
*/
enum {
RKStatusCodeClassInformational = 100,
RKStatusCodeClassSuccessful = 200,
RKStatusCodeClassRedirection = 300,
RKStatusCodeClassClientError = 400,
RKStatusCodeClassServerError = 500
};
typedef NSUInteger RKStatusCodeClass;
/**
Creates a new range covering the status codes in the given class.
@param statusCodeClass The status code class to create a range covering.
@return A new range covering the status codes in the given class.
*/
NSRange RKStatusCodeRangeForClass(RKStatusCodeClass statusCodeClass);
/**
Creates a new index set covering the status codes in the given class.
@param statusCodeClass The status code class to create an index set covering.
@return A new index set covering the status codes in the given class.
*/
NSIndexSet * RKStatusCodeIndexSetForClass(RKStatusCodeClass statusCodeClass);
// TODO: Implement these guys...
//NSString * RKStringFromStatusCode(NSInteger statusCode);
//NSInteger RKStatusCodeFromString(NSString *statusCode);