How to workaround PATCH-request, if PATCH not supported serverside - rest

I'm using ColdFusion 10 to communicate with PayPal's servers and for some requests I'd need to do HTTP PATCH requests which are not supported by CF10.
Is the PayPal REST API offering an alternate method to fake PATCH requests like appending ?_HttpMethod=PATCH to the request URI or sending a HTTP Header named X-HTTP-Method-Override with value PATCH?

Setting a header named X-HTTP-Method-Override with value PATCH works with PayPal REST API.

Related

OWASP ZAP How to send POST request through ZAP API

I am running ZAP in demon mode and I want to send a POST request for spider and active scans. I am using the sendRequest API and the form method is POST.
Problem: the requests are sent to the server without the request body.
How should I build the POST request to make this work?
Separate the data from the headers with 2 pairs of CRLF (\r\n\r\n) as per the HTTP spec.

Azure Logic App Custom Connector - SOAP to REST - Pass HTTP header from REST to SOAP request

In Azure I am able to create a Logic App Custom Connector to a SOAP API endpoint using Call Mode: SOAP to REST.
This SOAP Web Service needs an HTTP Header named Cookie with the value LoginCert=.
When modifying the Request of this connector I cannot find a way to add the Cookie HTTP header in the REST request and have that same Cookie be added to the SOAP request. Does anyone know how or if it is even possible to have HTTP headers from the REST request forwarded to the SOAP request made by the custom connector?
PS: This is possible in Azure via the API Management tool's REST to SOAP using the same WSDL, and then using the newly created REST endpoints inside of a Logic App Flow but this is not the solution.
TLDR: How can one add a HTTP header in an SOAP to REST Azure Logic App Custom Connector so the header is forwarded to the SOAP endpoint?
This is not currently supported by the SOAP to REST WSDL generated custom connectors for SOAP. You need indeed to either escape to APIM or you need to form the request payloads via LIQUID action then use the HTTP request action's advanced option to specify the cookie.

when we could send parameters by post why Http introduced put and patch?

I am trying to send parameters to my rest controller using postman and i see no difference when i use post, put or patch. Why HTTP introduced these methods if they are just same ?

What is http text post in webservice context?

I am having confusion around http text 'post' in terms of webservice context. We are having a web service which is built on SOAP protocol, now the integration partner wants to eliminate the SOAP portion of the XML message and wants us to post XML message as 'http text post'.
Is this REST HTTP POST? Please clarify.
POST is an HTTP request method, of which there are many (ex. GET, PUT, DELETE, HEAD...). POST is used to submit data to a server for processing, whereas GET (for example) is used to retrieve data for reading. You can read more here. These methods are used for all HTTP communication, whether the target is a SOAP/REST web service or an Apache server hosting a regular website.
SOAP normally operates using POST requests, although it is possible to use GET with SOAP 1.2 as well. GET requests have more restrictive size limitations than POST requests.

Tuleap - REST API with Cross-Origin Resource Sharing

I have a question regarding the Tuleap REST API when used with CORS.
Basically, I'm trying to make a REST call to see the backlog of my project.
Referring to the API Explorer, to do so I need to do a GET call like this: /api/projects/{id}/backlog I also need to add the custom headers X-Auth-Token and X-Auth-UserId to ensure the authentication.
When I do this request with a HTTP Request tool (Poster for Firefox) everything works fine and I get status 200.
The problem now is that I'm trying to develop an application (in angularJS) that would do the same request.
I noticed that when the page is doing the request, it starts by doing a preflight OPTIONS request which is due to the Cross-Origin-Ressource-Sharing.
It seems like the X-Auth-Token and X-Auth-UserId header are being put in the Access-Control-Request-Headers. Because of that I get an unauthorized 401 response code from the server and I can't complete the request.
I've been looking online and couldn't find my answer as how to make this call work.
There was a recent contribution that should remove the need for authentication on all OPTIONS routes in order to enable the preflight: http://gerrit.tuleap.net/#/c/2642/ It was
Integrated in Tuleap 7.2.99.36
Either your version of Tuleap is too old or there is a bug.
Note all calls still require some headers such as "Content-Type: application/json"; the integration tests should provide good examples of how to make calls:
https://tuleap.net/plugins/git/tuleap/tuleap/stable?p=tuleap%2Fstable.git&a=tree&h=9a513f2b7e765f7b9a4f7f72e9d43f40f623fec5&hb=293d47e4006531d3c0d04edfc6e7058e53c7c9c8&f=tests/rest
and
https://tuleap.net/plugins/git/tuleap/tuleap/stable?p=tuleap%2Fstable.git&a=tree&h=4d9071865a42cbd0d40f5f933b4b0b1047c54a8c&hb=293d47e4006531d3c0d04edfc6e7058e53c7c9c8&f=tests/lib/rest