How to use the PATCH method in HTTP adapters? - ibm-mobilefirst

Can any please help me about how to make HTTP call using the PATCH method in an HTTP Adapter in IBM Worklight?

The PATCH method is not supported. Per the HTTP adapter documentation:
You can use the HTTP adapter to send GET, POST, PUT, and DELETE HTTP
requests and retrieve data from the response body. Data in the
response can arrive in XML, HTML, or JSON formats.
You can submit feature requests via: http://www.ibm.com/developerworks/rfe/

Related

What are the actual request headers sent in the Intellij HTTP client?

IntelliJ has an HTTP client. When composing a file that is interpreted by the HTTP client, you can specify headers that go out to the server with the request, like so:
###
GET https://{{hostname}}/{{path}}
Content-Type: application/json
X-Auth-Token: {{x-token}}
I want to find the actual value of the token that was used to replace the variable name, seen above as {{x-token}}, but I don't see any way to obtain the request headers. The response headers are obviously available, but not the request headers. See the image below for the test results that are shown after running the HTTP client inside Intellij:
Is there a way to display the REQUEST headers?
Link to IntelliJ Documentation - HTTP Client -- the documentation seems to never mention the actual request headers that are sent over the wire, but they do discuss how to define request headers in composing the .http file type.
Check the Tools | HTTP Client | 'Show HHTP Requests History' action.

Azure logic app API http response with excel file download using Postman

Created azure logic app HTTP request it gives response for normal JSON schema However, I want to attach SharePoint excel sheet when I trigger the request from Postman.
1.How to used content type or schema to download the attached file. when postman request sent.
2.is that possible to download when you hit API through logic app
3.Generated HTTP POST URL is working
For your requirement, I test it in my side. It seems we do not need to set any value for "Content-Type" in headers of response. Please refer to my logic app below:
Then when you request the logic app url in postman, please choose "Send and Download" instead of "Send".
After that, you can download the file when request the url in postman.

How to pass form-data while calling API using Jmeter?

I want to make an API call using Jmeter.
In my API call, I'm sending a file with a request,
and I need to specify the file name as form-data.
e.g. when I call the same API from postman !
How do I, specify a filename when I make above call from Jmeter?
Jmeter call :
HTTP Request Sampler provides options to
set Use multipart/form-data for HTTP POST
send files with the request
See Performance testing: Upload and Download Scenarios with Apache JMeter guide for detailed explanations and configuration instructions.

Change the request_method from GET to POST

I need to transform a HTTP Request from a GET method to a POST methode in Apache.
Is it possible ?
I'm working with Dailymotion. This service send a GET method to my REST API to post some data. But I would like to receive a POST method to respect REST protocol.
I'm trying to make this transformation with Apache.
Thanks a lot.

Access to request HTTP headers in custom WCF MessageEncoder

Does anyone know how to get access to request HTTP headers within MessageEncoder.ReadMessage method?
It seems that WCF already "knows" request headers at the point of invoking ReadMessage method, at least Content-Type and Content-Length but I cannot get the access to the Content-Encoding header.
Basically, I'm trying to utilize gzip de/compression for WCF service (http://msdn.microsoft.com/en-us/library/ms751458.aspx) and would like to check if decompression is necessary for incoming request. To do that I'd like to check Content-Encoding header but cannot figure out where to get it.
Any ideas?
Thanks!
Here's an answer I gave in another thread which explains how you would need to manipulate the headers via the WebOperationContext in another IOperationBehavior which is coupled with the MessageEncoder.