You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Steffen Beyer <st...@beyer.io> on 2010/11/10 03:52:18 UTC

REST API

Hi,

I can't get this simple post request to work:

POST /weather/1289355395 HTTP/1.1
Accept: */*
Content-Type: text/xml
Content-Length: 335
Host: localhost:8080

<?xml version='1.0' encoding='UTF-8' standalone='true'?><CellSet><Row 
key='MTI4OTM1NTM5NQ=='><Cell 
column='c2FtcGxlOnByZXNzdXJl'>OTk4LjIz</Cell><Cell 
column='c2FtcGxlOndpbmRzcGVlZA=='>NC45</Cell><Cell 
column='c2FtcGxlOnRlbXBlcmF0dXJl'>MTIuMzQ=</Cell></Row></CellSet>

Decoded:

<?xml version='1.0' encoding='UTF-8' standalone='true'?><CellSet><Row 
key='1289355672'><Cell column='sample:pressure'>998.23</Cell><Cell 
column='sample:windspeed'>4.9</Cell><Cell 
column='sample:temperature'>12.34</Cell></Row></CellSet>

The response is always "Error 400 BAD_REQUEST" without any output to the 
logfiles.

Also tried single cell store with the same result. Inserting the cells in 
the shell does work fine. Tried 0.20.6 and 0.89.20100924.

What could be wrong?

Regards,
-- 
Steffen Beyer <st...@beyer.io>

GnuPG key fingerprint: CA00 1611 242B 89D4 E643  E235 05F3 7689 DD3E EB26
Public key available upon request or at http://wwwkeys.de.pgp.net

Re: REST API

Posted by Steffen Beyer <st...@beyer.io>.
On Wed, 10 Nov 2010 00:34:10 -0800, Bennett Neale wrote:
> The standalone attribute of your xml payload is incorrect.  The only
> allowable values for standalone are 'yes' or 'no'.

m(

Works like a charm now, thanks.

Regards,
-- 
Steffen Beyer <st...@beyer.io>

GnuPG key fingerprint: CA00 1611 242B 89D4 E643  E235 05F3 7689 DD3E EB26
Public key available upon request or at http://wwwkeys.de.pgp.net

Re: REST API

Posted by Bennett Neale <be...@gmail.com>.
The standalone attribute of your xml payload is incorrect.  The only
allowable values for standalone are 'yes' or 'no'.

On Tue, Nov 9, 2010 at 6:52 PM, Steffen Beyer <st...@beyer.io> wrote:

> Hi,
>
> I can't get this simple post request to work:
>
> POST /weather/1289355395 HTTP/1.1
> Accept: */*
> Content-Type: text/xml
> Content-Length: 335
> Host: localhost:8080
>
> <?xml version='1.0' encoding='UTF-8' standalone='true'?><CellSet><Row
> key='MTI4OTM1NTM5NQ=='><Cell
> column='c2FtcGxlOnByZXNzdXJl'>OTk4LjIz</Cell><Cell
> column='c2FtcGxlOndpbmRzcGVlZA=='>NC45</Cell><Cell
> column='c2FtcGxlOnRlbXBlcmF0dXJl'>MTIuMzQ=</Cell></Row></CellSet>
>
> Decoded:
>
> <?xml version='1.0' encoding='UTF-8' standalone='true'?><CellSet><Row
> key='1289355672'><Cell column='sample:pressure'>998.23</Cell><Cell
> column='sample:windspeed'>4.9</Cell><Cell
> column='sample:temperature'>12.34</Cell></Row></CellSet>
>
> The response is always "Error 400 BAD_REQUEST" without any output to the
> logfiles.
>
> Also tried single cell store with the same result. Inserting the cells in
> the shell does work fine. Tried 0.20.6 and 0.89.20100924.
>
> What could be wrong?
>
> Regards,
> --
> Steffen Beyer <st...@beyer.io>
>
> GnuPG key fingerprint: CA00 1611 242B 89D4 E643  E235 05F3 7689 DD3E EB26
> Public key available upon request or at http://wwwkeys.de.pgp.net
>