HTTP Request postman

Hello!
Began to study RPA quite recently. At the moment, my first practical project, there will be a record to the doctor via the website. Here I had a question on which I could not find the answer. Whether it is possible to start the robot through postman that json result was in postman?
For example. On the website there are 5 hospitals, I brought together them and sealed in json. When I call the robot through postman, it removes service parameters, and it would be desirable that it removed my json result from hospitals. Whether it is possible to realize it.
I apologize, Google Translate works!

1 Like

Hi @BarkerQ

Welcome to our UiPath Forum! :slight_smile:

Could you maybe explain it via images? I am not sure I get the scenario.

1 Like

Hi!
For example. I have openweaher api and i calling the weather output method for the regions of UK and London. In order to see the weather for London, I indicated it in the parameters and received in response a JSON of this schedule. Can I call robots with parameters and get my answer, as was demonstrated with the API of Openweather?
Picture

1 Like

Hi @BarkerQ

Yes! :slight_smile:
Simply install the UiPath.Web activity package and use the HTTP Request activity.

2 Likes

Hi. Can you give an example or guide of requests using UiPath.web?

1 Like

Sure, check out this sample project:
ExampleHTTPRequest.zip (10.5 KB)

It opens a webhook.site and then sends a request to its address. The request contains JSON body and a custom header:
image image


image

I hope it gives you an idea. Check out our Forum for more examples :slight_smile:

1 Like

Thank you very much!

2 Likes

Hi,

I am composing the body in the above format, to attach a form data file which is in pdf
format,

My http request body looks like below

“{”“ContentDisposition”":"“formdata”","“name”":"“file”","“filename”":"“C:/Users/AR485UY/Desktop/Test1.pdf”","“Content-Type”":"“application/pdf”"}"

I don’t face any issues when I make an Api call in the postman, but when I try with http request activity I keep getting error code 500

I get this error code in post man only when I don’t attach the file

Could any one help me out with this issue

1 Like

Hi…I am unable to download that ExamopleHTTPRequest zip file…please can u send me

1 Like

Hi i am unable to download your sample scenario.

1 Like

Hi @sunilraju

What is the error message?

Can you try now? :slight_smile:

1 Like

@loginerror still unable to download.

1 Like

Is it possible that you cannot download the zip files in your environment? If so, please see here the files themselves:
Main.xaml (6.7 KB) project.json (872 Bytes)

Please place them in on directory and open the project from the project.json file.

1 Like

@loginerror

can you please let me know how to pass xmlbody in to Body in httprequest?

1 Like

Hi @sunilraju

The easiest way would be to read your XML file from a text file to a variable and then pass that variable via the Body property of the HTTP request activity :slight_smile:

1 Like

@loginerror i have done what you said but i am getting below error,
“<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:sf=“urn:fault.partner.soap.sforce.com” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>soapenv:Bodysoapenv:FaultUNKNOWN_EXCEPTIONUNKNOWN_EXCEPTION: Content is not allowed in prolog.<sf:UnexpectedErrorFault xsi:type=“sf:UnexpectedErrorFault”>sf:exceptionCodeUNKNOWN_EXCEPTION</sf:exceptionCode>sf:exceptionMessageContent is not allowed in prolog.</sf:exceptionMessage></sf:UnexpectedErrorFault></soapenv:Fault></soapenv:Body></soapenv:Envelope>”

1 Like

Could you try if the same works in another tool, such as postman?

1 Like

Ok how can i find this “PostMan”. how can i get this.

1 Like

It is an application that allows you to test HTTP requests:
You can get it from here:

One thing to still try is to set this property to either ANY or XML:
image

1 Like

I have choosen xml only.

1 Like