activities
latest
false
UiPath logo, featuring letters U and I in white

Workflow Activities

Last updated Dec 6, 2024

Example: Using the RestSharp library in the Invoke Code activity

Say you need to execute the following C# code snippet with the Invoke Code activity:

var client=new RestClient("https://jsonplaceholder.typicode.com");var client=new RestClient("https://jsonplaceholder.typicode.com");
Where RestClient is a class in the RestSharp namespace.
For the previous snippet to execute successfully, you need to install the RestSharp library and import the RestSharp namespace in your project.
  1. Select the Azure feed, then search for the RestSharp library and install it. The RestSharp library should be displayed in the Dependencies tree of the Project panel.

    Note:

    If the Official feed does not display your library, you need to add the feed where the library may be hosted.

  2. In the Main window, switch to the Imports tab at the lower-left part.

  3. Search for the generic RestSharp namespace. Select it to add it to the namespaces list.
  4. Execute the activity.

docs image

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.