LRResty icon indicating copy to clipboard operation
LRResty copied to clipboard

POST not sending "body"

Open pctj101 opened this issue 13 years ago • 2 comments
trafficstars

It seems there is no HTTP Body when sending a simple post (iOS 5.0.1)

NSDictionary *params = [NSMutableDictionary dictionary]; [(NSMutableDictionary *)params setObject:@"Joe Bloggs" forKey:@"name"]; [(NSMutableDictionary *)params setObject:@"[email protected]" forKey:@"email"];

[[LRResty client] post:url payload:params withBlock:^(LRRestyResponse *response){}];

On the server side, no HTTP request body is received.

Tried both with current master and arcified branches.

pctj101 avatar Dec 15 '11 11:12 pctj101

I've not come across this issue before; the functional tests work OK. NSDictionary payloads are sent as form-encoded data; is this what your server is expecting?

lukeredpath avatar Dec 15 '11 16:12 lukeredpath

Yes, just normal form-encoded data expected. POSTing to a Rails app that otherwise works fine.

If I see any more, I'll let you know, but I am not actively focusing on this library since I found another one that worked on the first try.

This isn't to put this library down... it might have simply been some coincidence or circumstance that I didn't understand.

Thanks for at least looking.

pctj101 avatar Dec 22 '11 02:12 pctj101