HTTP Request activity

Hi

Do any of you guys have an example of how to fill out the options Body and Headers for the HTTP Request activity in UI-Path when using the Post method?

Hi,

I want to get data from share point list by using HTTP GET method.Can any of you guys share the sample code or suggest me like how to fill out the options.

Thanks in Advance.

  1. Use the HTTP Request component

Fill out:
AcceptFormat: JSON
EndPoint: “http:/site/xxxx/yyyy/_vti_bin/listdata.svc/YourListName”
Result: resultStr

  1. Use Deserialize json component
    Input: returnStr
    Output: jsonObj (JObject variable type)

For each item in jsonObj…

Hi,
Result Datatype would be in…?
Output3

I’m getting this error…:disappointed_relieved:

String. and you can also change the AcceptFormat and see if that helps.

Do you get a result when clicking on the Preview button when adding the endpoint in the component?

Hi,
Still I’m getting this error. I tried all Accept Format.

I’m not getting a result when clicking on the Preview button when adding the endpoint in the component.:disappointed_relieved::disappointed_relieved

My Endpoint is https://xyz.sharepoint.com/sites/abc/Lists/Sample%20List/AllItems.aspx But in your sample URL, .svc is there,what’s that…?

Hi,
Now I’m getting the data in xml format through HTTP Get activity in string variable.But, I wasn’t able to print the result in my console.Whether I need to change the datatype or not. If yes, how to do that?

Can you put that string into the Deserialize activity? You will get a json object out and then you can do a “for each” item in json object.

Yes, I put that in Deserialize activity. I’m getting the XDocument Instead of json object because I’m getting the xml data.
Here, how to get the specific tag value using for each activity?

what type should the TypeArgument in the For Each Activity be?

Don’t use deserialize, parse json string to jobject.
Create new variable as below:
JObject works when we use variable name “jobject” and variable type jobject with Default value to “new jobject”

Newtonsoft.Json.Linq.JObject

1 Like

Hi do you know how to parse XML format in HTTP request.

My full query is posted here