empty NSData object in transport.rawPostData

1 view
Skip to first unread message

roddi

unread,
Aug 19, 2010, 6:09:54 AM8/19/10
to Bombax Support
Hi,

When I send an http request to my bombax server (basically an
unchanged new project) that includes data ([myRequest
setHTTPBody:dataToSend] on the client) I get an empty NSData object in
transport.rawPostData.

Where do I start looking for things going wrong?

Greetings
Roddi

P.S. Details of the client side:

NSMutableURLRequest * myRequest = [NSMutableURLRequest requestWithURL:
[NSURL URLWithString:[self APIURL]]
cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:((0.0
< requestTimeOut) ? requestTimeOut : 60.0)];

[myRequest setHTTPMethod:@"POST"];
[myRequest setValue:@"text/xml; charset=\"utf-8\""
forHTTPHeaderField:@"Content-Type"];
[myRequest setValue:@"close" forHTTPHeaderField:@"Connection"];
[myRequest setCachePolicy:NSURLRequestReloadIgnoringCacheData];
[myRequest setHTTPShouldHandleCookies:NO];

[myRequest setValue:[NSString stringWithFormat:@"%lu", (unsigned long)
[dataToSend length]] forHTTPHeaderField:@"Content-Length"];
[myRequest setHTTPBody:dataToSend];

NSError *myError = nil;
NSURLResponse *myResponse;
NSData * receivedData = [NSURLConnection
sendSynchronousRequest:myRequest
returningResponse:&myResponse
error:&myError];
Reply all
Reply to author
Forward
0 new messages