cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Trajan1
New Member

Ingest Content Type = application/x-www-form-urlencode via HTTP Request

Hi Folks, 

 

I am trying to ingest a HTTP Request with Content Type "application/x-www-form-urlencoded"

 

Note: I am a noob

 

flow.PNG

 

I literally just want to put everything in the request into the blob... I'm not fussed if I can't parse it here (I can do that downstream)

 

Help appreciated.

 

T1

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Trajan1 ,

 

To better assist you with this issue, please consider contacting MS Support to assist you with your issue.

12.PNG

Due to the limitations of the forum, it is not very friendly to solve such problems. Engineers may need to crawl HTTP requests to help you analyze this problem, which can also solve your problem more efficiently.

 

Best Regards,

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

View solution in original post

8 REPLIES 8
v-bacao-msft
Community Support
Community Support

 

Hi @Trajan1 ,

 

Your requirement seems to be very similar to this thread, please refer to this thread and see if it helps:

https://powerusers.microsoft.com/t5/Building-Flows/application-x-www-form-urlencoded-content-type-er...

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-bacao-msft
Community Support
Community Support

 

Hi @Trajan1 ,

 

You could click Generate from sample, and then fill in the content you configured in the Body to generate the Schema.

In this way, the request body can be automatically parsed and the dynamic content can be referenced to obtain the key-value.

 

Best Regards,

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

Thanks for your response. I had already reviewed that post you linked with no success... not sure what to put in the generate from sample.. that rest body I copied from another post so it is likely not correct (noob)

 

my issue seems to be the POST request sent (that they cannot change)

 

here is a sample they sent me to review: it looks like its gzip encoded? I just that data at the end.

======================================================

Content-Type: application/x-www-form-urlencoded\r\n
User-Agent: OFSServiceEngine/2.0 Wink Client v1.1.2\r\n
Transfer-Encoding: chunked\r\n
Host: 192.168.194.67\r\n
Connection: Keep-Alive\r\n
Cookie: PHPSESSID=d8b988c7239ac56f4019b7ec57551d51\r\n
Cookie pair: PHPSESSID=d8b988c7239ac56f4019b7ec57551d51
Accept-Encoding: gzip,deflate\r\n
Authorization: Basic xxxx\r\n
\r\n
[Full request URI: http://192.168.194.67/test]
[HTTP request 1/1]
[Response in frame: 2522]
HTTP chunked response
Data chunk (664 octets)
Chunk size: 664 octets
Data (664 bytes)
Data: 626c6f623d25374225323269642532322533416e756c6c25...
[Length: 664]
Chunk boundary: 0d0a
End of chunked encoding
Chunk size: 0 octets
\r\n
File Data: 664 bytes
HTML Form URL Encoded: application/x-www-form-urlencoded
Form item: "blob" = "{"id":null,"createTime":368841600000,"dismissTime":0,"workcentre":"OFSSERVICETEST000","message":"OFS Alert service test.","workflow":"Alert","workstate":"Active","alertconfig":{"template":null,"uid":"00000000-0000-0000
Key: blob
Value [truncated]: {"id":null,"createTime":368841600000,"dismissTime":0,"workcentre":"OFSSERVICETEST000","message":"OFS Alert service test.","workflow":"Alert","workstate":"Active","alertconfig":{"template":null,"uid":"00000000-0000-0000-

=============================

 

Hi @Trajan1 ,

 

Is the sample you provided the body of When a HTTP request is received or the Request Body you configured in the trigger?

Generate from sample I mentioned is to generate the Schema by filling in the Request Body configuration here.

6.PNG7.PNG

Here are some articles explaining the usage of When a HTTP request is received in detail, please check it and see if it helps:

securing-your-http-request-trigger-in-flow

understanding-the-trigger-when-a-http-request-is-received

validate-calls-to-the-ms-flow-http-request-trigger

secure-http-request-to-msflow

 

Best Regards,

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

Thanks Barry I'll read those links.

 

For clarity the example I sent was sent to me by the supplier. they want me to ingest their POST request and copy the data in the form into a blob for downstream reporting. It seems simple but it's apparent that PA does not like this kind of HTTP request? and the supplier cannot change it to "application/json"

 

I don't know a lot about HTTP requests and how to parse this content type so I guess I'm stuck. I was hoping someone could help tell me how to configure the HTTP request schema based on the example POST. I'm in fail town.

 

Cheers

T1

 

Hi @Trajan1 ,

 

Regarding how to parse this content type, my original post mentioned that your question is very similar to the one in the link.

https://powerusers.microsoft.com/t5/Building-Flows/application-x-www-form-urlencoded-content-type-er...

You just need to extract $formdata first, and then use Parse JSON to parse out the key-value.

Maybe you can ask the thread’s Owner to help complete the HTTP request creation. It seems that the methods you are using are very similar.

 

Best Regards,

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

Thank Barry,

 

As I mentioned, I have already tried the techniques described in that link and it does not work... based on my research I think it is not that simple unfortunately and I don't want to sully an answered question with a new request.

 

My current guess is that the POST request being sent is somehow more complex than I anticipated... it is gzipped and the transmit type is "chunked"

 

Also note there is no Content-Length parameter in the sample POST request but PA is reading a Content-Length 0 in the Header. I suspect it is finding no Content-Length and not going ahead. Either that or a chunked request may need special handling?


Cheers

T1

 

 

Hi @Trajan1 ,

 

To better assist you with this issue, please consider contacting MS Support to assist you with your issue.

12.PNG

Due to the limitations of the forum, it is not very friendly to solve such problems. Engineers may need to crawl HTTP requests to help you analyze this problem, which can also solve your problem more efficiently.

 

Best Regards,

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

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,271)