2

When I do a PUT request in RESTClient it works, but it fails in the Postman Chrome extension.

I need to call the Hadoop REST API. When I use curl all is okay, as with RESTClient. It fails when I use Python httplib, as with Postman.

Here is it working in RESTClient: RESTClient 没问题

Here is it failing in Postman: 邮递员失败

It returns a java.lang.UnsupportedOperationException with the message op=NULL is not supported.

How can I send this PUT request correctly with Python's httplib? For some reason curl is not suitable here.

4

1 回答 1

0

看起来您要访问的端点需要op在查询字符串中提供一个参数。您有?op=CREATERESTClient 屏幕截图,但它没有出现在您的 Postman 屏幕截图中。

我还注意到,在您的 RESTClient 屏幕截图中,服务器正在响应重定向以添加附加参数overwrite=false;您可能需要将此参数添加到您的请求中,以便实际执行操作。

于 2013-03-30T06:06:56.703 回答