You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nihal Jain (JIRA)" <ji...@apache.org> on 2018/06/11 16:14:00 UTC

[jira] [Created] (HBASE-20715) REST curl command for create namespace with "Content-Type: text/xml" specified (mistakenly) results in a 400 Bad Request

Nihal Jain created HBASE-20715:
----------------------------------

             Summary: REST curl command for create namespace with "Content-Type: text/xml" specified (mistakenly) results in a 400 Bad Request
                 Key: HBASE-20715
                 URL: https://issues.apache.org/jira/browse/HBASE-20715
             Project: HBase
          Issue Type: Task
          Components: documentation, REST
            Reporter: Nihal Jain


I have a habit of setting "Content-Type: text/xml" for curl commands. Today, I had a bad time debugging the 400 error for below command. Finally, this discussion helped me in resolving the problem.

As pointed out by [~mwarhaftig] and [~misty] in their discussion in HBASE-14147, a curl request of the following form will throw a {{400 BAD REQUEST}}
{code:java}
curl -vi -X POST -H "Accept: text/xml" -H "Content-Type: text/xml"  "http://my_server:20550/namespaces/new_ns2/"
{code}
I think we should document this in the description for "Create a new namespace" explicitly mentioning that users should take care "Content-Type" is not set for this particular command.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)