Don't send parameterization of the object with DELETE request's either. Update docs to reflect this. refs #947

This commit is contained in:
Blake Watters
2012-10-04 19:25:32 -04:00
parent af234936ee
commit 25e1f9ed4d
2 changed files with 2 additions and 2 deletions

View File

@@ -251,7 +251,7 @@ RKMappingResult, RKRequestDescriptor, RKResponseDescriptor;
/**
Creates and returns an `NSMutableURLRequest` object with a given object, method, path, and parameters.
The manager is searched for an `RKRequestDescriptor` object with an objectClass that matches the class of the given object. If found, the matching request descriptor and object are used to build a parameterization of the object's attributes using the `RKObjectParameterization` class if the request method is a `POST`, `PUT`, or `PATCH`. The parameterized representation of the object is reverse merged with the given parameters dictionary, if any, and then serialized and set as the request body. If the HTTP method is `GET`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL.
The manager is searched for an `RKRequestDescriptor` object with an objectClass that matches the class of the given object. If found, the matching request descriptor and object are used to build a parameterization of the object's attributes using the `RKObjectParameterization` class if the request method is a `POST`, `PUT`, or `PATCH`. The parameterized representation of the object is reverse merged with the given parameters dictionary, if any, and then serialized and set as the request body. If the HTTP method is `GET` or `DELETE`, the object will not be parameterized and the given parameters, if any, will be used to construct a url-encoded query string that is appended to the request's URL.
If the given path is nil, the router is searched for a class route with the class of the object andthe method. The path pattern of the retrieved route is interpolated with the object and the resulting path is appended to the HTTP client's base URL and used as the request URL.

View File

@@ -223,7 +223,7 @@ static BOOL RKDoesArrayOfResponseDescriptorsContainEntityMapping(NSArray *respon
NSString *stringMethod = RKStringFromRequestMethod(method);
NSDictionary *requestParameters = nil;
RKRequestDescriptor *requestDescriptor = RKRequestDescriptorFromArrayMatchingObject(self.requestDescriptors, object);
if (method != RKRequestMethodGET && requestDescriptor) {
if ((method != RKRequestMethodGET && method != RKRequestMethodDELETE) && requestDescriptor) {
NSError *error = nil;
requestParameters = [[RKObjectParameterization parametersWithObject:object requestDescriptor:requestDescriptor error:&error] mutableCopy];
if (parameters) {