- Información general
- Criptografía
- Base de datos
- Java
- Python
- WebAPI
Actividades de desarrollador
UiPath.Web.Activities.HttpClient
Esta actividad está disponible en las versiones del paquete WebAPI anteriores a la versión 2.0.0-preview. Para una experiencia actualizada, utiliza la actividad de solicitud HTTP mejorada incluida en la vista previa de la versión 2.0.0 de WebAPI.
Descripción
Enables you to perform HTTP requests to a specified web API. When first dragging this activity to the Designer panel, the HTTP Request Wizard window is displayed, providing an easier way of building requests and previewing server responses.
If the returned HTTP status code (StatusCode) is 0, it means that the server did not return an actual response for some reason. This usually points to some connectivity or network issues you might be having.
El paquete WebAPI no es compatible con las siguientes actividades: UiPath.Salesforce.Activities y UiPath.Jira.Activities.
Compatibilidad de proyectos
Windows - Heredado | Windows | Multiplataforma
Windows, Windows: configuración heredada
La ventana del Asistente de importación
Puede usarlo para importar una solicitud HTTP en formato CURL.
La ventana del Asistente de solicitud HTTP
Todos los campos presentes en el asistente también están disponibles en el panel de Propiedades. Como resultado, puedes seguir editando tus preferencias después de cerrar el asistente. Puedes configurar la actividad en el asistente utilizando valores o variables fijos.
Cuando se utilizan variables, la funcionalidad de vista previa no está disponible.

La pestaña del creador de solicitudes
- End Point - The URL to which you want to make the request. Custom segments have to be placed between braces "{}" and defined in the Parameters section. For example, this URL
https://platform.uipath.com/odata/Robots(28)can be written ashttps://platform.uipath.com/odata/Robots({id}), and the value of theidparameter can be provided in the Parameters section, as a UrlSegment. - Preview URL - A preview of the URL provided in the End Point field, taking into account the information provided in the Parameters section.
- Enable SSL certificate verification - Check this box to verify SSL certificates when sending a request. Verification failures will result in the request being aborted.
- Timeout - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 6000 milliseconds (6 seconds).
- Certificado de cliente : la ubicación en la que se almacena el archivo de certificado de cliente. Se debe proporcionar la ruta completa. La codificación de certificados compatible es
X.509y las extensiones compatibles son.pfxy.p12. Admite la verificación de protocolo de enlace bidireccional.Nota:La ruta no debe escribirse entre comillas.
- Client Certificate Password - The password that corresponds to the Client Certificate file you are using.
- Request Method - The request method to be used when calling the API. The following HTTP verbs are supported:
GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCHandMERGE. By default, theGETmethod is selected. - Authentication - Specifies the authentication protocol to be used when calling the API. The following protocols are supported:
- None - The default option. It should be used if the web server you are sending requests to does not require an authentication protocol.
- Simple Http - This option has to be selected if the API you are making requests to uses a simple HTTP authentication protocol. If chosen, two additional fields are displayed - Username and Password, which have to be filled in with valid credentials for the specified API.
- OAuth1 - This option has to be selected if the API you are making requests to uses an OAuth1 protocol. If chosen, four fields are displayed: Consumer Key, Consumer Secret, Access Token, Access Token Secret.
- OAuth2 - This option has to be selected if the API you are making requests to uses an OAuth2 protocol. If chosen, the Access Token field is displayed. This access token is usually generated as a response to another HTTP request to the indicated API.
La sección de parámetros
- Add Parameter - Adds a new line in the Parameters table, with the GetOrPost type. A new line is not added if the previous line is not filled in.
- Add Header - Adds a new line in the Parameter table, with the HttpHeader type. A new line is not added if the previous line is not filled in.
Nota:
In the case where you want to add multiple values for a header, they must be concatenated through a comma (
,). - Add URL Segment - Adds a new line in the Parameters table, with the UrlSegment type. A new line is not added if the previous line is not filled in.
- Delete - Removes a selected line in the Parameters table. If a line is not selected, this button is disabled.
La tabla de parámetros
- Name - The name of the parameter, header or URL segment.
- Value - The value of the parameter, header or URL segment.
- Type - The type of line. The following options are available:
- GetOrPost - Indicates that the line is a parameter that can be used in requests.
- HttpHeader - Indicates that the line added in the Parameters table is a request header to be sent when making the API call.
- UrlSegment - Indicates that the line added is a fragment or the URL provided in the End point field.
Nota:
In some cases, an error might be returned stating that duplicate parameters cannot exist. These may be caused by authentication requests that need to contain the Password and Username parameters. In these cases, we recommend passing them using the Body property.
La sección de Archivos adjuntos
- Add Attachment - Enables you to add a file to the HTTP request performed, by creating a new line. Enabled only when the Request Method is set to
POSTorPUT. - Eliminar archivo adjunto : te permite eliminar una línea añadida previamente, en la sección Archivos adjuntos .
- Name - The name of the file you want to attach.
- File Path - The full path of the file you want to attach.
- Tipo : indica qué tipo de información estás enviando. Este campo se rellena automáticamente con Archivo adjunto.Vista previa : te permite obtener una vista previa de la solicitud HTTP que creaste y abre la pestaña Respuesta .
La pestaña Respuesta
Esta pestaña te permite previsualizar la solicitud que deseas incluir en tu flujo de trabajo. Se puede acceder a ella seleccionando el botón Vista previa en el asistente Solicitud HTTP una vez que rellenes todos los campos y configures la solicitud. Como alternativa, también puedes cambiar la pestaña en la parte superior del asistente.

Esta página comprende lo siguiente:
- Request Info - This section displays details about the request that was performed. It displays the request URL, method and status code.
- Preview Response - Displays the web server's response.
- Raw Body - Displays the web server's response, in a raw form.
- Response Info - Displays details about the web server's response. It displays the response status and code, and the content-type header supported.
- Download Resource - Enables you to download the requested resources to an indicated file.
- Refresh - Enables you to perform the request again.
Panel de propiedades
Autenticación de certificado del cliente
- CertificadoDeCliente : la ubicación en la que se almacena el archivo de certificado de cliente. Se debe proporcionar la ruta completa. La codificación de certificados compatible es
X.509y las extensiones compatibles son.pfxy.p12. Admite la verificación de protocolo de enlace bidireccional. - ContraseñaDelCertificadoDeCliente : la contraseña que corresponde al archivo de certificado de cliente que estás utilizando.
- Enable SSL certificate verification - Verify SSL certificates when sending a request. Verification failures will result in the request being aborted. This field only supports Boolean values (True, False).
- ContraseñaDeCertificadoDeClienteSegura : la contraseña para el archivo de certificado de cliente especificado, en forma de cadena segura. Este campo solo admite variables SecureString.
Común
- ContinuarEnCasoDeError : especifica si la automatización debe continuar incluso cuando la actividad arroja un error. Este campo solo admite valores booleanos (Verdadero, Falso). El valor predeterminado es Falso. Como resultado, si el campo está vacío y se produce un error, la ejecución del proyecto se detiene. Si el valor se establece en Verdadero, la ejecución del proyecto continúa independientemente de cualquier error.
Nota:
If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed.
- Nombre para mostrar: el nombre para mostrar de la actividad.
- Timeout (milliseconds) - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 6000 milliseconds (6 seconds).
Entrada
- AcceptFormat - The format in which to receive the web server's response. The following options are supported: ANY - the default value, XML, JSON, and CUSTOM. When choosing the CUSTOM AcceptFormat, if an
AcceptoracceptHeader parameter is present, then it will be sent as the custom accept format. If no header parameter is set,acceptwill get the RestSharp default value:application/json, aboveapplication/xml, text/json, text/x-json, text/javascript, text/xml. - Request Method - The request method to be used when calling the API. The following HTTP verbs are supported:
GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCHandMERGE. By default, theGETmethod is selected.Nota:La solicitud HTTP funciona correctamente solo con la versión 106.11.2 o inferior del paquete RestSharp. Devuelve un error cuando se instala la versión 106.11.4 o posterior de RestSharp.
- Request URL - The URL to which you want to make the request. Custom segments have to be placed between braces "{}" and defined in the Parameters section. For example, this URL
https://platform.uipath.com/odata/Robots(28)can be written ashttps://platform.uipath.com/odata/Robots{id}, and the value of theidparameter can be provided in the URLSegments window.
Otros
- Privado : si se selecciona, los valores de variables y argumentos ya no se registran en el nivel Detallado.
OAuth1
- ConsumerKey - The consumer key to be used if the API you are making requests to is based on the OAuth1 authentication protocol.
- ConsumerSecret - The consumer secret to be used if the API you are making requests to is based on the OAuth1 authentication protocol.
- OAuth1Token - The access token to be used if the API you are making requests to is based on the OAuth1 authentication protocol, after an authorization request for the consumer has been approved.
- OAuth1TokenSecret - The secret to be used if the API you are making requests to is based on the OAuth1 authentication protocol, after an authorization request for the consumer has been approved.
OAuth2
- OAuth2Token - The access token to be used if the API you are making requests to is based on the OAuth2 authentication protocol. This access token is usually generated as a response to another HTTP request to the indicated API.
Opciones
- Archivos adjuntos : te permite adjuntar archivos a las solicitudes. Selecciona el botón Elipsis para abrir la ventana Archivos adjuntos y añadir todos los archivos necesarios.
- Body - The body of the request.
- BodyFormat - The format in which the body has to be. By default, it is filled in with
application/xml. This field supports strings and string variables. - Cookies : las cookies en la solicitud HTTP. Selecciona el botón Elipsis para abrir la ventana Cookies .
- File attachments - List of attachments for the request.
- Filename for response attachment - The filename to be used for the file returned by the request.
- Encabezados : te permite incluir encabezados personalizados en la solicitud HTTP. Selecciona el botón Elipsis para abrir la ventana Encabezados .
- Parámetros : los parámetros de la solicitud. Selecciona el botón Elipsis para abrir la ventana Parámetros , que corresponde a la sección Parámetros.
- SegmentosUrl : segmentos personalizados añadidos a la URL del punto final entre llaves "{}". Selecciona el botón Elipsis para abrir la ventana SegmentosURL . Por ejemplo, la URL
https://platform.uipath.com/odata/Robots(28)puede escribirse comohttps://platform.uipath.com/odata/Robots{id}, y el valor del parámetroidpuede proporcionarse en la ventana SegmentosDeURL . Este campo admite cadenas y variables de cadena.
Salida
- Headers - The response received from the HTTP request.
- Response attachment - The attachment saved from the response.
- Response content - The response received from the HTTP request, as a string variable.
- Response status - The status code received from the HTTP request, as an integer variable.
Autenticación simple
- Password - Indicates that the web service uses simple authentication and enables you to input your password. Adding a username is also required. This property supports strings and string variables.
- SecurePassword - Indicates that the web service uses secure authentication and enables you to input your secure string password. Adding a username is also required. This property supports secure string variables.
- Username - Indicates that the web service uses simple authentication and enables you to input your username. Adding a password is also required. This property supports strings and string variables.
Configuración multiplataforma
- Request Method - The request method to be used when calling the API. The following HTTP verbs are supported:
GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCHandMERGE. By default, theGETmethod is selected. - Request URL - The URL to which you want to make the request. Custom segments have to be placed between braces "{}" and defined in the Parameters section. For example, this URL
https://platform.uipath.com/odata/Robots(28)can be written ashttps://platform.uipath.com/odata/Robots{id}, and the value of theidparameter can be provided in the URLSegments window. - Parámetros : los parámetros de la solicitud. Selecciona el campo para abrir la ventana Diccionario .
- Encabezados : te permite incluir encabezados personalizados en la solicitud HTTP. Selecciona el campo para abrir la ventana Diccionario .
- Body - The body of the request.
- Authentication - Specifies the authentication protocol to be used when calling the API. The following protocols are supported:
- None - The default option. It should be used if the web server you are sending requests to does not require an authentication protocol.
- Simple Http - This option has to be selected if the API you are making requests to uses a simple HTTP authentication protocol. If chosen, two additional fields are displayed - Username and Password, which have to be filled in with valid credentials for the specified API.
- OAuth1 : esta opción debe seleccionarse si la API a la que realizas las solicitudes utiliza un protocolo OAuth1. Si se elige, se muestran cuatro campos adicionales: Clave de consumidor, Secreto de consumidor, Token de acceso, Secreto de token de acceso.
- OAuth2 - This option has to be selected if the API you are making requests to uses an OAuth2 protocol. If chosen, the Access Token field is displayed. This access token is usually generated as a response to another HTTP request to the indicated API.
- Certificado de cliente : esta opción debe seleccionarse si se necesita un certificado de cliente para completar la llamada a la API. Si se elige, se muestran dos campos adicionales:
- CertificadoDeCliente : la ubicación en la que se almacena el archivo de certificado de cliente. Se debe proporcionar la ruta completa. La codificación de certificados compatible es
X.509y las extensiones compatibles son.pfxy.p12. Admite la verificación de protocolo de enlace bidireccional. - ContraseñaDelCertificadoDeCliente : la contraseña que corresponde al archivo de certificado de cliente que estás utilizando.
- CertificadoDeCliente : la ubicación en la que se almacena el archivo de certificado de cliente. Se debe proporcionar la ruta completa. La codificación de certificados compatible es
Avanzado
Opciones
- Timeout (milliseconds) - Specifies the amount of time (in milliseconds) to wait for the activity to run before an error is thrown. The default value is 6000 milliseconds (6 seconds).
- Continue On Error - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is not configured and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
- SSL certificate verification - If selected, verifies SSL certificates when sending a request. Verification failures will result in the request being aborted.
- Aceptar formato : el formato en el que recibir la respuesta del servidor web. Se admiten las siguientes opciones: CUALQUIERA : el valor predeterminado, XML, JSON y CUSTOM. Al elegir el formato de aceptación personalizado , si está presente un parámetro de encabezado
Acceptoaccept, se enviará como el formato de aceptación personalizado. Si no se establece ningún parámetro de encabezado,acceptobtendrá el valor predeterminado de RestSharp:application/json, application/xml, text/json, text/x-json, text/javascript, text/xmlapplication/json, application/xml, text/json, text/x-json, text/javascript, text/xml - File Attachments - List of attachments for the request.
- Filename for response attachment - The filename to be used for the file returned by the request.
- BodyFormat - The format in which the body has to be. By default, it is filled in with
application/xml. This field supports strings and string variables. - Cookies : las cookies en la solicitud HTTP. Selecciona el campo para abrir la ventana Diccionario .
- Segmentos de URL : segmentos personalizados añadidos a la URL del punto final entre llaves "{}". Selecciona el campo para abrir la ventana Diccionario . Por ejemplo, la URL
https://platform.uipath.com/odata/Robots(28)puede escribirse comohttps://platform.uipath.com/odata/Robots{id}, y el valor del parámetroidpuede proporcionarse en la ventana Diccionario . Este campo admite cadenas y variables de cadena.
Salida
- Response content - The response received from the HTTP request, as a string variable.
- Response status - The status code received from the HTTP request, as an integer variable.
- Response headers - The response received from the HTTP request.
- Response attachment - The attachment saved from the response.