phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Phoenix Query Server - proper POST body format
Date Wed, 06 Apr 2016 22:09:50 GMT
Hi Jared,

This is just a bad error message on PQS' part. Sorry about that. IIRC, 
it was something obtuse like not finding the server-endpoint for the 
JSON message you sent.

If you want to do a POST and use the body, you can just put the bytes 
for your JSON blob in there and that should be sufficient. Nothing fancy 
should be necessary.

If you need some more direction than that, let me know what version 
you're running and perhaps an example of your client request.

Thanks and good luck!

- Josh

Jared Katz wrote:
> I’m guessing this will be a pretty easy question for someone to answer…
>
> I’ve had success making POST requests to the Query Server by putting the
> payload in the request header, like so:
>
> Key: “request”
>
> Value: “{"request": "prepareAndExecute", "sql": "SELECT* FROM table",
> "maxRowCount": -1, "connectionId": "12345"}”
>
> How do I properly format the payload for the request /body/? I tried
> using the same key and value in the form-data for the request body, but
> I’m getting a 500 error with the following message:
>
> “Problem accessing /. Reason: java.lang.NullPointerException”
>
> Thanks,
>
> Jared
>

Mime
View raw message