HTTP "PATCH" verb in network.request

Hello,

Some requests from my server use the verb “patch”, but when using this verb with corona I get the message:

WARNING: nonstandard network.request method “PATCH” may require custom HTTP headers

And my server rest, does not interpret the method correctly.

Note: I do not have access to change the methods of my rest server.

In the link: http://feedback.coronalabs.com/forums/188732-corona-feature-requests-feedback/suggestions/12483327-enable-patch-method-in-network-request  it is marked as completed the feature.

I am using the latest version of the corona “2017.3122”

Thanks for support

We support PATCH and other arbitrary HTTP verbs that may come in the future but only in the aspect that we pass the verb, headers and body to the server. PATCH is relatively new. It’s implementation across servers varies. Because of this, we can’t sanity check the content. 

If you can, talk to the people running the REST server and see if they can give you all the headers, exact format for the body content, etc. needed for PATCH to work with them. As far as the warning goes, that’s there to alert you that PATCH may need extra headers to work for you. Because it’s not working, then this is likely the case. Only your server creators can provide you the specifications.

What response code are you getting from your server? Are there any other diagnostics that can help troubleshoot the problem.

Here are a few web pages that talk about PATCH and it’s requirements and quirks that might help you at least ask the right questions:

https://en.wikipedia.org/wiki/Patch_verb

http://williamdurand.fr/2014/02/14/please-do-not-patch-like-an-idiot/

http://restcookbook.com/HTTP%20Methods/patch/

http://www.restapitutorial.com/lessons/httpmethods.html

Rob

I have similar problem. PATCH request works just fine from simulator, but on Android  (4.4 and 6.0.1)  app crash. ADB dump: 

I/Corona ( 7739): WARNING: nonstandard network.request method "PATCH" may require custom HTTP headers E/Corona ( 7739): ERROR: network: Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]

Daily Build : 2017.3163

We support PATCH and other arbitrary HTTP verbs that may come in the future but only in the aspect that we pass the verb, headers and body to the server. PATCH is relatively new. It’s implementation across servers varies. Because of this, we can’t sanity check the content. 

If you can, talk to the people running the REST server and see if they can give you all the headers, exact format for the body content, etc. needed for PATCH to work with them. As far as the warning goes, that’s there to alert you that PATCH may need extra headers to work for you. Because it’s not working, then this is likely the case. Only your server creators can provide you the specifications.

What response code are you getting from your server? Are there any other diagnostics that can help troubleshoot the problem.

Here are a few web pages that talk about PATCH and it’s requirements and quirks that might help you at least ask the right questions:

https://en.wikipedia.org/wiki/Patch_verb

http://williamdurand.fr/2014/02/14/please-do-not-patch-like-an-idiot/

http://restcookbook.com/HTTP%20Methods/patch/

http://www.restapitutorial.com/lessons/httpmethods.html

Rob

I have similar problem. PATCH request works just fine from simulator, but on Android  (4.4 and 6.0.1)  app crash. ADB dump: 

I/Corona ( 7739): WARNING: nonstandard network.request method "PATCH" may require custom HTTP headers E/Corona ( 7739): ERROR: network: Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE]

Daily Build : 2017.3163