You need to send the request-header Content-Type: application/json.
Here is an example with curl
curl \
--header "Content-type: application/json" \
--request POST \
--data '{
"queryType" : "SQL",
"query" : "select * from dfs.mydata.orderprodview limit 1"
}' \
http://192.168.110.133:8047/query.json
[ {
"order_total" : 13,
"category" : "Binders and Binder Accessories",
"prod_id" : 909,
"name" : "Wilson Jones Ledger-SizePiano-Hinge Binder2Blue",
"state" : "ca",
"month" : "June",
"order_id" : 67212,
"cust_id" : 10001
}]
Here is an example with a Chrome Rest plugin
https://www.mapr.com/blog/how-use-sql-hadoop-drill-rest-json-nosql-and-hbase-simple-rest-client#.VYMFvPlViko
On Thu, Jun 18, 2015 at 7:17 AM, Nayan Paul <[email protected]> wrote:
> Hi I have integrated drill on Cloudera cluster and have a hbase table that
> I have to access through REST from PHP.
>
> I can query my hbase table from apache drill query editor , but when I use
> Postman to test json response from the request then i get 415 internet
> error
>
> response from Postman
>
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
> <title>Error 415 Unsupported Media Type</title>
> </head>
> <body><h2>HTTP ERROR 415</h2>
> <p>Problem accessing /query.json. Reason:
> <pre> Unsupported Media Type</pre></p><hr><i><small>Powered by
> Jetty://</small></i><hr/>
>
> </body>
> </html>
>
> Regards,
>
> ___________________________________________________________________________
>
>
> Nayan Paul | Phone No: +91-9831814333 | email: [email protected]
>