开发者

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 HTTP开发者_JS百科Request(posturl, HTTPMethod.DELETE));
int responseCode = response.getResponseCode();

This is for Google Appengine. The 'DELETE' request is for the facebook graph API. The above code gives me a status code 400 - Bad Request.

This is for face4j an open source java library that I've built for the facebook graph API.


This isn't really an App Engine problem; 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. If that's supposed to be a scrubbed URL, you've omitted the detail that would facilitate troubleshooting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜