cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PCavacas
Level: Power Up

HTTP Post to Custom API

I have a Document Library on a SharePoint site.  I also have a custom ASP.NET Core web App that I want to receive this file.  So I setup a Flow that triggers when a file is created in the Document Library and then I setup an Http action to POST the file to my custom API.

Flow

My problem is that I cannot figure out what I need to do in my custom API to handle the information that is coming into the application.  The headers for the request are below:

Connection:Keep-Alive 
Content-Length:738 
Content-Type:application/json 
Accept-Language:en-US 
Host:os-gbsphotoretain.azurewebsites.net 
Max-Forwards:10 
User-Agent:azure-logic-apps/1.0 (workflow e1588a67033a49479a92ef043e69b5b2; version 08586988637787126155) 
x-ms-execution-location:westus 
x-ms-workflow-id:e1588a67033a49479a92ef043e69b5b2 
x-ms-workflow-version:08586988637787126155 
x-ms-workflow-name:13c3cc3c-9490-412b-a646-64afaba937c2 
x-ms-workflow-system-id:/locations/westus/scaleunits/prod-38/workflows/e1588a67033a49479a92ef043e69b5b2 
x-ms-workflow-run-id:08586985479583974318084941306 
x-ms-workflow-run-tracking-id:709dfbfa-5dd6-42ec-be06-6554e9cc5813 
x-ms-workflow-operation-name:HTTP 
x-ms-workflow-subscription-id:655be0f1-fb2c-4c5a-9fbf-ff414e1b901b 
x-ms-workflow-resourcegroup-name:DDE15EEBA6BD46A29F03D44429074ECF-AED4AEFEB5854E71B4A5FE7C32E74E14 
x-ms-tracking-id:5c8e158c-a43c-4529-aa94-8f1c7d2c4ffd 
x-ms-correlation-id:5c8e158c-a43c-4529-aa94-8f1c7d2c4ffd 
x-ms-client-request-id:5c8e158c-a43c-4529-aa94-8f1c7d2c4ffd 
x-ms-client-tracking-id:08586985479583974318084941306 
x-ms-action-tracking-id:8722f083-ef23-4a53-8dc8-b6046ebabce6 
X-LiveUpgrade:1 
X-WAWS-Unencoded-URL:/Image/ProcessJson 
X-Original-URL:/Image/ProcessJson 
X-ARR-LOG-ID:8d5713e4-e692-4feb-90e5-029cd131c090 
DISGUISED-HOST:os-gbsphotoretain.azurewebsites.net 
X-SITE-DEPLOYMENT-ID:os-gbsphotoretain 
WAS-DEFAULT-HOSTNAME:os-gbsphotoretain.azurewebsites.net 
X-Forwarded-For:52.160.92.112:43696 
X-ARR-SSL:2048|256|C=US, S=Washington, L=Redmond, O=Microsoft Corporation, OU=Microsoft IT, CN=Microsoft IT SSL SHA2|CN=*.azurewebsites.net 
MS-ASPNETCORE-TOKEN:ff0cdca6-c854-4c2e-b70c-16a1555a18f4 
X-Original-For:127.0.0.1:49721 
X-Original-Proto:http

I also have the Request.Stream, but I can't make heads or tails of what that data is and how it must be encoded?

 

1 REPLY 1
Community Support Team
Community Support Team

Re: HTTP Post to Custom API

Hi @PCavacas,

 

If your Web App has a open Swagger endpoint, then you may consider take use of the Http + Swagger action:

Use the HTTP + Swagger action

 

Besides, the file type and the ecoding should be mentioned in the previous action (When a new file is created ).

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (7,040)