Httpzoid icon indicating copy to clipboard operation
Httpzoid copied to clipboard

patch request?

Open franciscocorrales opened this issue 12 years ago • 8 comments

franciscocorrales avatar Nov 01 '13 15:11 franciscocorrales

what do you mean?

kodart avatar Nov 01 '13 19:11 kodart

is there support for PATCH request?

franciscocorrales avatar Nov 01 '13 19:11 franciscocorrales

there are shortcut methods for frequently used methods: GET, POST, PUT, DELETE but you can use custom methods calling request(url, "PATCH")

kodart avatar Nov 01 '13 19:11 kodart

Now, I see the problem. Can you fix it?

kodart avatar Nov 01 '13 19:11 kodart

Greetings

I tried the following code:

Http http = HttpFactory.create(activity); http.request(url, "PATCH") .data(new newTabClass(newTab)) .header("If-Match", etag) .header("Content-Type", contentType) .header("Accept", "application/json") .header("Authorization", "Basic " + getAuth()) .send();

but I got this error: "Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]"

Is there any way around this? Will you support the PATCH method in the future?

jorgelsalas avatar Nov 05 '13 22:11 jorgelsalas

There is no simple solution since HttpUrlConnection does not support PATCH request, but I will make it support PATCH.

On Wed, Nov 6, 2013 at 3:09 AM, Jorge [email protected] wrote:

Greetings

I tried the following code:

Http http = HttpFactory.create(activity); http.request(url, "PATCH") .data(new newTabClass(newTab)) .header("If-Match", etag) .header("Content-Type", contentType) .header("Accept", "application/json") .header("Authorization", "Basic " + getAuth()) .send();

but I got this error: "Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]"

Is there any way around this? Will you support the PATCH method in the future?

— Reply to this email directly or view it on GitHubhttps://github.com/kodart/Httpzoid/issues/7#issuecomment-27817930 .

Regards, Artur

kodart avatar Nov 06 '13 03:11 kodart

@kodart That would be great. Looking forward the next release !

franciscocorrales avatar Nov 06 '13 14:11 franciscocorrales

Thank you very much!

jorgelsalas avatar Nov 06 '13 14:11 jorgelsalas