[英]Http 400 in appengine when using URLFetch with Http Method 'DELETE'
I've been unable to make a "DELETE" request using the code below : 我无法使用以下代码发出“删除”请求:
URLFetchService fetchService = URLFetchServiceFactory.getURLFetchService();
URL posturl = new URL("http://www.example.com/comment?token=xxx");
HTTPResponse response = fetchService.fetch(new HTTPRequest(posturl, HTTPMethod.DELETE));
int responseCode = response.getResponseCode();
This is for Google Appengine. 这是针对Google Appengine的。 The 'DELETE' request is for the facebook graph API.
“删除”请求用于facebook图形API。 The above code gives me a status code 400 - Bad Request.
上面的代码为我提供了状态代码400-错误的请求。
This is for face4j an open source java library that I've built for the facebook graph API. 这是针对face4j的,我为facebook graph API构建了一个开源Java库。
This isn't really an App Engine problem; 这实际上不是App Engine的问题; it just means that the destination webserver wouldn't accept your request.
这仅表示目标网络服务器不会接受您的请求。
If you're actually trying to send a DELETE to example.com, that's your problem. 如果您实际上是想将一个DELETE发送到example.com,那就是您的问题。 If that's supposed to be a scrubbed URL, you've omitted the detail that would facilitate troubleshooting.
如果应该使用清理后的URL,则省略了有助于故障排除的详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.