question

CasperRubaek avatar image
0 Votes"
CasperRubaek asked RupeshGupta-6266 published

Making HTTP GET request with Body

I have a requirement to make a HTTP GET request with an included Body content since it is used as search parameters.
However it seems that both Azure Logic Apps and Azure Data Factory can't solve this.

Is there an alternative solution other than doing it manually with a Function App?

azure-data-factoryazure-functionsazure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

kasperulvedal avatar image
1 Vote"
kasperulvedal answered CasperRubaek edited

Calling HTTP GET with a request body can be done using either Azure Data Factory or Azure Logic Apps.

In Data Factory you can setup a copy activity using a Rest API as source. Set the request method to GET and fill in Request body:

91431-screenshot-2021-04-26-at-231345.png

Logic Apps allows you to use a HTTP request. Set method to GET and fill in the body.

91425-screenshot-2021-04-26-at-230600.png



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Logic app will save without errors, but when you trigger it directly in logic app designer it gets this error:

94057-image.png

When I send the same request in postman it says this similar error:

400 bad request:

{
"error": {
"code": "TriggerRelativePathNotValid",
"message": "Call to trigger 'manual' with HTTP method 'GET' is not valid. Request content must not be included for 'GET, HEAD, DELETE' requests."
}
}



Data factory also doesn't seem to support this scenario.

The only solution I found was using a C# function app with this library: https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=net-5.0.


@Microsoft please inform whether or not this scenario is possible if not using a function app.


0 Votes 0 ·
image.png (23.4 KiB)
image.png (21.3 KiB)
RupeshGupta-6266 avatar image
0 Votes"
RupeshGupta-6266 answered RupeshGupta-6266 published

Mentioned solution for Azure Data Factory doesnt seem to be possible. I tried to used GET method as source in Copy Activity but i cant see request body.

Please let me know if it is possible to pass x-www-form-urlencoded data to API using GET method with the help of ADF Web Activity??

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.