Help with http Request Post (formdata)

Hello,
I have checked here: How to send a Body type "Form Data" using POST in a HTTP Request
and here: How to pass JSON in HTTP POST request body?

I’m trying to upload a file. I can do it in postman:

It fails in uipath:

Any help appreciated.

Hi @kyqurikan,

Declare the variable as the type JsonObject and pass it with double quotes, then it will work

Refer this posts:

@kyqurikan,

Can you please check this link. This might helpful for you question.

Please let me know if you’re facing same problem.

Thanks,
Arunachalam.

The parameter just has string. How do you change it. Double clicking on Type does nothing and I don’t see a way to change it.

I think you have to pass the body as string and no need to change the type… Just pass the value for the variable as

“{”“Key1”":"“Value1””,"“Key2”":"“Value2””,"“Key3”":"“Value3””}"
It will work for sure

If you want to change variable types,
In the variables pane below the workflow, you can change the type by double clicking on the type. You will get a drop down and browse for more types.

I read through the link, I don’t see how it helps solve the issue. I don’t see any examples on any of these posts on how to accomplish this task. I don’t mean to sound snappy. I appreciate the response.

I don’t think I can do that because I’m trying to upload a file to Oracle Content and Experience Cloud using the API. The documentation requires the file be uploaded using form-data. They don’t have examples of how to accomplish this passing the body as a string.

1 Like

@kyqurikan,

I just saw the file you have attached as a form data,

but we have the option as in the screenshot

Can you try this one?

After further tampering I believe the issue is with the
jsonInputParameter value:
“{“parentID”: “FEF98F4245FABCCFB2DA03FDFC254717B94CC7FC3C29”}”

UiPath doesn’t like it.

Just replace single quote with double quote… nothing to confuse
i.e., " --> “”

“{”“parentID”": ““FEF98F4245FABCCFB2DA03FDFC254717B94CC7FC3C29"”}”

Let me know if it is working @kyqurikan

No. Still not working.

@kyqurikan,

Can you please try this one.

"{parentID: FEF98F4245FABCCFB2DA03FDFC254717B94CC7FC3C29}”


I hope this will work.

image

image

@kyqurikan,

May I know whether this way is working?

"{parentID: FEF98F4245FABCCFB2DA03FDFC254717B94CC7FC3C29}”

Thanks,
Arunachalam

No.
Main.xaml (13.2 KB)
project.json (881 Bytes)

@kyqurikan

I’m working on your problem Can you please share me the supported PDF file. Because sample PDF file is not recognized.

Thanks,
Arunachalam.

TryOneUiPath.pdf (1.7 MB)

@kyqurikan,

Can you please change the Accept Format as JSON and try.

Thanks,
Arunachalam