Unable to use POST variables.

6 views
Skip to first unread message

MrBeardsley

unread,
Aug 11, 2010, 3:49:50 PM8/11/10
to Bombax Support
Hello,

I'm trying to do an XHR call to a BXApp and wanting to use post
variables. Using the web inspector in Safari I can see that a request
was sent, and it did use the POST method with a payload. Here is the
output:

Request URL:http://10.0.1.110:80/vault/login
Request Method:POST
Status Code:200 OK
Request Headers
Accept:application/json
Cache-Control:max-age=0
Content-Type:application/json; charset=UTF-8
If-Modified-Since:Thu, 01 Jan 1970 00:00:00 GMT
Origin:http://10.0.1.110
Referer:http://10.0.1.110:80/
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us)
AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8
X-Requested-With:XMLHttpRequest
Request Payload
{"username":"test","password":"1234"}
Response Headers
Connection:keep-alive
Content-Type:text/html; charset=utf-8
Date:Wed, 11 Aug 2010 19:38:25 GMT
Server:Bombax 1.0 : nginx/0.8.31
Transfer-Encoding:Identity

I have a handler that gets called, but the POST variables are always
empty. Here is what is in my handler:

- (id)renderWithTransport:(BxTransport *)transport {

if ([transport.requestPath isEqualToString:@"/favicon.ico"]) {
[transport setHttpStatusCode:404];
return self;
}

NSLog(@"Post Variables: %@", [transport.postVars description]);

return self;
}

I have also tried the [transport.rawPostData description] but that
always comes back as null. I'm not sure what I'm doing wrong.

Dominic Blais

unread,
Aug 11, 2010, 3:52:10 PM8/11/10
to Bombax Support
Hello. Please try the latest version at http://code.google.com/p/bombax/source/checkout
as there was a POST bug in the prior version that may have caused
this.
Thanks,
Dominic Blais
COO & Hacker-in-Chief

On Aug 11, 12:49 pm, MrBeardsley <christopher.d.hard...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages