title: PUT request , change headers and save response in core data using RESTkit
body: <p>I want to send a request to a server, a PUT request with the following request headers:</p>
  
  <pre><code>Content-Type: application/json; charset=UTF-8
  </code></pre>
  
  <p>And the following <code>NSDictionary</code>:</p>
  
  <pre><code>{"title": "Sumit"}
  </code></pre>
  
  <p>I am making a put request using reskit, put request is made but gives error related to headers.
  I want to know how to set headers and dict when sending a request to a remote server.
  Also, which method is best of <code>RKObjectManager</code> for this task among :- </p>
  
  <p>method 1:-</p>
  
  <pre><code>- NSMutableURLRequest *request = [manager requestWithObject:newImage
                                                     method:RKRequestMethodPUT
                                                       path:[kImageUrl stringByAppendingString:imageUrl]
                                                 parameters:jsonParameters];
  </code></pre>
  
  <p>method 2:- </p>
  
  <pre><code>- (NSMutableURLRequest *)multipartFormRequestWithObject:(id)object
                                                   method:(RKRequestMethod)method
                                                     path:(NSString *)path
                                               parameters:(NSDictionary *)parameters
                                constructingBodyWithBlock:(void (^)(id &lt;AFMultipartFormData&gt; formData))block;
  </code></pre>
  
  <p>ERROR THAT I AM GETTING :-</p>
  
  <pre><code>(400 Bad Request) [0.4221 s]: Error Domain=AFNetworkingErrorDomain Code=-1016 
  "Expected content type {(
     "application/x-www-form-urlencoded",
     "application/json"
  )}, got text/plain" UserInfo=0xa0951c0 {NSLocalizedRecoverySuggestion=Bad Request,
  AFNetworkingOperationFailingURLRequestErrorKey=&lt;NSMutableURLRequest  
  http://staging.zoomdeck.com/api/image/c5ot31sxnh8v/&gt;, 
  NSErrorFailingURLKey=http://staging.zoomdeck.com/api/image/c5ot31sxnh8v/,  
  NSLocalizedDescription=Expected content type {(
      "application/x-www-form-urlencoded",
      "application/json"
  )}, got text/plain, AFNetworkingOperationFailingURLResponseErrorKey=&lt;
  NSHTTPURLResponse: 0xa194530&gt;}
  2013-01-16 17:19:43.860 Zoomdeck[2905:4a07] E 
  restkit.network:RKObjectRequestOperation.m:285 Object request failed: 
  Underlying HTTP request operation failed with error: Error 
  Domain=AFNetworkingErrorDomain Code=-1016 "Expected content type {(
      "application/x-www-form-urlencoded",
      "application/json"
  )}, got text/plain" UserInfo=0xa0951c0 {NSLocalizedRecoverySuggestion=Bad Request,  
  AFNetworkingOperationFailingURLRequestErrorKey=&lt;NSMutableURLRequest 
  http://staging.zoomdeck.com/api/image/c5ot31sxnh8v/&gt;, 
  NSErrorFailingURLKey=http://staging.zoomdeck.com/api/image/c5ot31sxnh8v/, 
  NSLocalizedDescription=Expected content type {(
      "application/x-www-form-urlencoded",
      "application/json"
  )}, got text/plain, AFNetworkingOperationFailingURLResponseErrorKey=
  &lt;NSHTTPURLResponse: 0xa194530&gt;}
  2013-01-16 17:19:43.861 Zoomdeck[2905:c07] Expected content type {(
      "application/x-www-form-urlencoded",
      "application/json"
  )}, got text/plain
  </code></pre>