[ https://issues.apache.org/jira/browse/HBASE-20715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nihal Jain updated HBASE-20715: ------------------------------- Description: 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. was: 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. > 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 > Priority: Minor > > 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)