Hi Folks,
I am trying to ingest a HTTP Request with Content Type "application/x-www-form-urlencoded"
Note: I am a noob
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
Solved! Go to Solution.
Hi @Trajan1 ,
To better assist you with this issue, please consider contacting MS Support to assist you with your issue.
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,
Hi @Trajan1 ,
Your requirement seems to be very similar to this thread, please refer to this thread and see if it helps:
Best Regards,
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,
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.
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
Best Regards,
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.
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,
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.
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,
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
23 | |
23 | |
23 | |
17 |
User | Count |
---|---|
57 | |
39 | |
37 | |
29 | |
28 |