简体   繁体   English

将URLFetch与Http方法'DELETE'一起使用时,appengine中的Http 400

[英]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.

相关问题 使用Future在App引擎上异步urlfetch Http发布 - Async urlfetch Http post on App engine using Future 请求数量很大时显示400错误的HTTP发布方法 - HTTP post method showing 400 error when number of request is big 将HTTP Basic-Auth与Google App Engine URLFetch服务配合使用 - Using HTTP Basic-Auth with Google App Engine URLFetch service 使用jClouds在Swift上执行批量删除时,“HTTP方法DELETE不支持输出”异常 - “HTTP method DELETE doesn't support output” exception when executing a bulk-delete on Swift using jClouds HTTP DELETE总是返回HTTP / 400错误消息 - HTTP DELETE always returns a HTTP/400 error message 在Java中尝试使用HttpClient发送HTTP Post GraphQL查询时使用HTTP 400 - HTTP 400 When Trying to Send HTTP Post GraphQL Query using HttpClient in Java 使用REST模板调用时,如何从HTTP删除方法获取Java中的响应正文(JSON) - How to get the response body (JSON) in Java from an HTTP delete method when called using the REST template Java GAE UrlFetch是否支持HTTP PUT? - Does Java GAE UrlFetch support HTTP PUT? Cors 阻塞 HTTP 删除方法 - Cors blocking HTTP delete Method App Engine的URLFetch:http GET在本地工作,但在特定URL上部署到GAE时则不起作用 - App Engine's URLFetch: http GET works locally but not when deployed to GAE on a specific URL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM