Re: empty NSData object in transport.rawPostData

3 views
Skip to first unread message

Ruotger Skupin

unread,
Aug 23, 2010, 11:45:01 AM8/23/10
to Bombax Support
Hi,

I have tried the 1.1.beta1 frameworks. Makes no difference. Any ideas?

Roddi

2010/8/19 roddi <raub...@googlemail.com>:
> 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