You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Feng Ce (JIRA)" <ji...@apache.org> on 2017/03/01 08:50:45 UTC
[jira] [Updated] (HBASE-17713) the interface '/version/cluster'
with header 'Accept: application/json' return is not JSON but plain text
[ https://issues.apache.org/jira/browse/HBASE-17713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Feng Ce updated HBASE-17713:
----------------------------
Description:
Hbase REST API, this interface `get 'version/cluster'`, when I use the header `Accept: application/json`, the response is not JSON but plain text.
curl -X GET \
-H "Accept: application/json" \
"http://localhost:8888/version/cluster"
"1.2.2"
But when I use `Accept: text/xml`, the response is correct XML.
curl -X GET \
-H "Accept: text/xml" \
"http://localhost:8888/version/cluster"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ClusterVersion>1.2.2</ClusterVersion>
was:
Hbase REST API, this interface `get 'version/cluster'`, when I use the header `Accept: application/json`, the response is not JSON but plain text.
curl -X GET \
-H "Accept: application/json" \
"http://localhost:8888/version/cluster"
"1.2.2"
But when I use `Accept: text/xml`, the response is correct XML.
curl -X GET \
-H "Accept: text/xml" \
"http://localhost:8888/version/cluster"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ClusterVersion>1.2.2</ClusterVersion>
> the interface '/version/cluster' with header 'Accept: application/json' return is not JSON but plain text
> ---------------------------------------------------------------------------------------------------------
>
> Key: HBASE-17713
> URL: https://issues.apache.org/jira/browse/HBASE-17713
> Project: HBase
> Issue Type: Bug
> Components: REST
> Affects Versions: 1.2.2
> Environment: Hhbase 1.2.2
> Reporter: Feng Ce
> Priority: Minor
> Original Estimate: 6h
> Remaining Estimate: 6h
>
> Hbase REST API, this interface `get 'version/cluster'`, when I use the header `Accept: application/json`, the response is not JSON but plain text.
> curl -X GET \
> -H "Accept: application/json" \
> "http://localhost:8888/version/cluster"
> "1.2.2"
> But when I use `Accept: text/xml`, the response is correct XML.
> curl -X GET \
> -H "Accept: text/xml" \
> "http://localhost:8888/version/cluster"
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?><ClusterVersion>1.2.2</ClusterVersion>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)