I am using Azure function apps with C# (or NodeJS). How to write a http post request to achieve below task?
- Http triger function app should send an HTTP request to a different server to get some data.
- Read the incoming response and send back by the http trigger source as a JSON file.
I am new to Azure function and your support would be greatly helpful.
For example
URL: https://postman-echo.com/post
HTTP's headers:
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: Keep-Alive
Content-Length: 1330
Content-Type: multipart/form-data;boundary=XXXXabcXXXX
Keep-Alive: timeout=30000
Transfer-Encoding: chunked
HTTP Body:
--XXXXabcXXXX
Content-Disposition: form-data; name="RequestData"
Content-Type: application/JSON; charset=utf-8
Content-Transfer-Encoding: 8bit
{
"cmdDict":
{
"application":"b",
"application_session_id":"cd"
},
"appId": "123",
"uId":"345645"
}
--XXXXabcXXXX
Content-Disposition : form-data; name="Parameter"; paramName="REQUEST_INFO"
Content-Type: application/json; charset=utf-8
Content-Transfer-Encoding: 8bit
{
"abc":
{"x":"default",
"y":[],
"message":"HELLO WORLD"
},
"D":1
}
--XXXXabcXXXX--