HTTP Patch request

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTP Patch request

4D Tech mailing list
Greetings,

I’m trying to update portions of a record on an external REST server (not 4D).

The docs for it tell me to use a PATCH request for partial updates.

I was hoping to use 4D’s HTTP Request command to send along the JSON required to make the particular modifications.

However, there doesn’t seem to be a Constant for a HTTP patch method

Any ideas? Suggestions?

Tom Swenson


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Patch request

4D Tech mailing list
 just pass "PATCH" as text literal to HTTP Request.

standard constants (GET, POST, etc) are string constants too.

2017/03/28 0:09、Tom Swenson via 4D_Tech <[hidden email]<mailto:[hidden email]>> のメール:
However, there doesn’t seem to be a Constant for a HTTP patch method
Any ideas? Suggestions?



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Patch request

4D Tech mailing list
Thanks! I’ll give it a try

Tom Swenson

On 3/27/17, 11:58 AM, "4D_Tech on behalf of Keisuke Miyako via 4D_Tech" <[hidden email] on behalf of [hidden email]> wrote:

     just pass "PATCH" as text literal to HTTP Request.
   
    standard constants (GET, POST, etc) are string constants too.
   
    2017/03/28 0:09、Tom Swenson via 4D_Tech <[hidden email]<mailto:[hidden email]>> のメール:
    However, there doesn’t seem to be a Constant for a HTTP patch method
    Any ideas? Suggestions?
   
   


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Patch request

4D Tech mailing list
In reply to this post by 4D Tech mailing list
It worked!

$statusCode:=HTTP Request("PATCH";$URL;$jsontoSend;$response;$headernames;$headervalues)

BTW, the dest is salesforce.

Tom Swenson

On 3/27/17, 11:58 AM, "4D_Tech on behalf of Keisuke Miyako via 4D_Tech" <[hidden email] on behalf of [hidden email]> wrote:

     just pass "PATCH" as text literal to HTTP Request.
   
    standard constants (GET, POST, etc) are string constants too.
   
    2017/03/28 0:09、Tom Swenson via 4D_Tech <[hidden email]<mailto:[hidden email]>> のメール:
    However, there doesn’t seem to be a Constant for a HTTP patch method
    Any ideas? Suggestions?
   


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************