Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Mike Waldron
    REST APIs: PATCH hangs - What do you do?
    Topic posted July 14, 2016 by Mike WaldronGold Medal: 3,500+ Points 
    575 Views, 5 Comments
    Title:
    REST APIs: PATCH hangs - What do you do?
    Content:

    I was wondering this, but I figured it out, so I thought I'd share. It's in the documentation, but it's not easy to find (search for "HTTP Tunneling"):

    In cases where the browser or client application does not support PATCH requests, or network intermediaries block PATCH requests, HTTP tunneling can be used with a POST request by supplying an X-HTTP-Method-Override header.

    For example, making a POST request to the incident with ID 22:

    https://mysite.example.com/services/rest/connect/v1.3/incidents/22

    with the header:

    X-HTTP-Method-Override: PATCH

    and body:

    {
    "subject": "Test Subject"
    }

    updates the incident's subject to Test Subject.

    That fixed me right up.

    Comment

     

    • Dietrik

      Thanks Mike for the info.

      Oracle is a bit inconsistent in the design of api's (like PATCH or PUT between the rest api's, or authentication)., you always need to check the docs to see what they've produced this time.

       

    • Erica (Leep) Anderson

      Thanks for taking the time to share this information with the Community, Mike! We super appreciate it and love to see folks contributing to the "collective community brain" with tips and tricks that other members can learn from. 

      Best,

      Erica, Community Manager

    • Michel Jilderda

      Excellent, thanks for this post. You just saved our life. ;) 

      We just ran into an issue with the PATCH operation. We received error SSL read: error:00000000:lib(0):func(0):reason(0), errno 104

      We were able to resolve it by using this trick. 

    • Rajan Davis

      This fixed an error for me, was getting really annoyed but saw this and it worked.

      Is there an issue with how the servers are handling PATCH requests?

      Thanks for sharing, Mike!

    • Janusz Jasinski

      There definitely is now as it's gone down from what I can tell: http://stackoverflow.com/questions/41616236/python-requests-patch-method-doesnt-work