I'm trying to pass parameters into my HTTP POST request to a web API.
Using postman, I can easily set the parameter "batchDate" to be something like "2021-03-21T22:04:55.8299681-10:00". But i can't find how to do that in Power Automate Desktop.
I've tried passing into the headers: {batchDate:"2021-03-21T22:04:55.8299681-10:00"} or {"batchDate":"2021-03-21T22:04:55.8299681-10:00"} but i keep getting error message: "Failed to invoke web service: Specified value has invalid HTTP Header characters. Parameter name: name."
Can someone help me out?
If you have one header only, then following works, otherwise create a list variable:
batchDate:2021-03-21T22:04:55.8299681-10:00
key:value
I tried that but didn't work. Getting error: No HTTP resource was found that matches the request URI ...
I do notice because it's a date time string, there's colon in the middle so there're multiple colons instead of 2. even if i omit the time portion, it's still giving me the same error.
The error indicates that there is something wrong with the URL. Why is it plain http?
Its an internally developed api. Its not the issue with the link because im able to do Python,curl or Postman just fine. Just cant do it in Power Automate.
Can you give an example of how you do it in a list? A list only have values so how do you specify key and value pairs?
Try this test site and send a request with your header, works fine for me https://hookbin.com/
For a list, just create a new list and add the header key:value pair as a new item. It's basically just a cell per header row
Hi Fraenk,
Thanks for your help by providing me the tool for unit test. I was able to make it work. It turns out the API is looking for the parameter in the link, not the header. i'm good with this one.
Next thing I have to find out is how to attach text file to the request. HOpefully I can figure that out too, then my project will be completed!
Much appreciate!
Here is a similar example: https://willpagenz.wordpress.com/2019/12/20/using-the-http-action-to-post-multipart-form-data-in-pow...
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.