UiPath Documentation
activities
latest
false

Atividades do desenvolvedor

Última atualização 21 de abr de 2026

Solicitação HTTP (herdada)

UiPath.Web.Activities.HttpClient

Importante:

Essa atividade está disponível em versões do pacote WebAPI anteriores à 2.0.0-preview. Para uma experiência atualizada, use a atividade HTTP Request aprimorada incluída no WebAPI versão 2.0.0-preview.

Description

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.

Observação:

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.

Importante:

O pacote de WebAPI não é compatível com as seguintes atividades: UiPath.Salesforce.Activities e UiPath.Jira.Activities.

Compatibilidade do projeto

Windows - Legada | Windows | Multiplataforma

Windows, Windows - configuração herdada

A Janela do Assistente de Importação

Isso pode ser usado para importar uma solicitação HTTP em um formato CURL.

A janela do assistente de solicitação HTTP

Todos os campos presentes no assistente também estão disponíveis no painel de Propriedades. Como resultado, você ainda pode editar suas preferências após fechar o assistente. Você pode configurar a atividade no assistente usando valores codificados ou variáveis.

Observação:

Quando variáveis são usadas, a funcionalidade de visualização fica disponível.

Imagem dos documentos

A guia Criador de solicitações

  • 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 as https://platform.uipath.com/odata/Robots({id}), and the value of the id parameter 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 do cliente - O local no qual o arquivo do Certificado do cliente é armazenado. O caminho completo deve ser fornecido. A codificação do certificado suportada é X.509 e as extensões suportadas são .pfx e .p12. É compatível com a verificação de handshake bidirecional.
    Observação:

    O caminho não deve ser escrito entre aspas.

  • 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, PATCH and MERGE. By default, the GET method 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.

A Seção 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.
    Observação:

    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.

A Tabela 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.
      Observação:

      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.

A Seção de Anexos

  • 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 POST or PUT.
  • Excluir anexo - Permite que você exclua uma linha adicionada anteriormente, na seção Anexos .
  • Name - The name of the file you want to attach.
  • File Path - The full path of the file you want to attach.
  • Tipo - Indica que tipo de informação você está enviando. Esse campo é preenchido automaticamente com Anexo.Visualização - Permite que você visualize a solicitação HTTP que você criou e abre a guia Resposta .

A guia Resposta

Essa guia permite que você visualize a solicitação que você deseja incluir em seu fluxo de trabalho. Pode ser acessada selecionando o botão Pré-visualização no assistente de Solicitação HTTP assim que você preencher todos os campos e configurar a solicitação. Ou então, você também pode alterar a guia na parte superior do assistente.

Imagem dos documentos

Esta página compreende o seguinte:

  • 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.
Painel de Propriedades

CertificateAuthentication do Cliente

  • ClientCertificate - O local no qual o arquivo do Certificado do Cliente é armazenado. O caminho completo deve ser fornecido. A codificação do certificado suportada é X.509 e as extensões suportadas são .pfx e .p12. É compatível com a verificação de handshake bidirecional.
  • SenhaDoCertificadoDoCliente - A senha que corresponde ao arquivo do Certificado do Cliente que você está usando.
  • 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).
  • SenhaSeguraDoCertificadoDoCliente - A senha para o arquivo do Certificado do Cliente especificado, na forma de uma string de segurança. Este campo é compatível apenas com variáveis SecureString.

Comum

  • ContinuarComErro — especifica se a automação deve continuar mesmo quando a atividade gera um erro. Este campo só aceita valores booleanos (True, False). O valor padrão é False. Como resultado, se o campo estiver em branco e um erro for lançado, a execução do projeto será interrompida. Se o valor for definido como True, a execução do projeto prosseguirá mesmo com erros.
    Observação:

    Se esta atividade estiver incluída em Try Catch e o valor da propriedade Continuar com erro for Verdadeiro, nenhum erro será capturado quando o projeto for executado.

  • DisplayName - O nome de exibição da atividade.
  • 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 Accept or accept Header parameter is present, then it will be sent as the custom accept format. If no header parameter is set, accept will 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, PATCH and MERGE. By default, the GET method is selected.
    Observação:

    A HTTP Request funciona corretamente apenas com o pacote RestSharp versão 106.11.2 ou inferior. Ele retorna um erro quando o RestSharp versão 106.11.4 ou superior é instalado.

  • 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 as https://platform.uipath.com/odata/Robots{id}, and the value of the id parameter can be provided in the URLSegments window.

Diversos

  • Privado - Se selecionado, os valores de variáveis e argumentos não são mais registrados no nível Verbose.

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.

Opções

  • Anexos - Permite que você anexe arquivos a solicitações. Selecione o botão Reticências para abrir a janela Anexos e adicionar todos os arquivos necessários.
  • 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 - Os cookies na solicitação HTTP. Selecione o botão Reticências para abrir a janela 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.
  • Cabeçalhos - Permite que você inclua cabeçalhos personalizados na solicitação HTTP. Selecione o botão Reticências para abrir a janela Cabeçalhos .
  • Parâmetros - Os parâmetros da solicitação. Selecione o botão Reticências para abrir a janela Parâmetros , que corresponde à seção Parâmetros.
  • SegmentosDeURL - Segmentos personalizados adicionados ao URL do ponto de extremidade entre chaves "{}". Selecione o botão Reticências para abrir a janela SegmentosDeURL . Por exemplo, a URL https://platform.uipath.com/odata/Robots(28) pode ser escrita como https://platform.uipath.com/odata/Robots{id}, e o valor do parâmetro id pode ser fornecido na janela SegmentosDeURL . Este campo é compatível apenas com strings e variáveis string.

Saída

  • 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.

Autenticação Simples

  • 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.

Configuração 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, PATCH and MERGE. By default, the GET method 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 as https://platform.uipath.com/odata/Robots{id}, and the value of the id parameter can be provided in the URLSegments window.
  • Parâmetros - Os parâmetros da solicitação. Selecione o campo para abrir a janela Dicionário .
  • Cabeçalhos - Permite que você inclua cabeçalhos personalizados na solicitação HTTP. Selecione o campo para abrir a janela Dicionário .
  • 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 – Essa opção deve ser selecionada se a API para a qual você está fazendo solicitações usa um protocolo OAuth1. Se selecionada, quatro campos adicionais serão exibidos: Chave do consumidor, Segredo do consumidor, Token de acesso, Segredo do token de acesso.
    • 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 – Essa opção deve ser selecionada se um certificado de cliente for necessário para concluir a chamada de API. Se selecionada, dois campos adicionais serão exibidos:
      • ClientCertificate - O local no qual o arquivo do Certificado do Cliente é armazenado. O caminho completo deve ser fornecido. A codificação do certificado suportada é X.509 e as extensões suportadas são .pfx e .p12. É compatível com a verificação de handshake bidirecional.
      • SenhaDoCertificadoDoCliente - A senha que corresponde ao arquivo do Certificado do Cliente que você está usando.

Avançado

Opções

  • 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.
  • Aceitar formato - O formato no qual receber a resposta do servidor da Web. As seguintes opções são compatíveis: QUALQUER - o valor padrão, XML, JSON e PERSONALIZADO. Ao escolher o FormatoAceito PERSONALIZADO , se um Accept ou parâmetro de cabeçalho accept estiver presente, ele será enviado como o formato de aceitação personalizado. Se nenhum parâmetro de cabeçalho for definido, accept obterá o valor padrão RestSharp:
    application/json, application/xml, text/json, text/x-json, text/javascript,
                            text/xml
    application/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 - Os cookies na solicitação HTTP. Selecione o campo para abrir a janela Dicionário .
  • Segmentos de URL - Segmentos personalizados adicionados ao URL do ponto de extremidade entre chaves "{}". Selecione o campo para abrir a janela Dicionário . Por exemplo, a URL https://platform.uipath.com/odata/Robots(28) pode ser escrita como https://platform.uipath.com/odata/Robots{id}, e o valor do parâmetro id pode ser fornecido na janela Dicionário . Este campo é compatível apenas com strings e variáveis string.

Saída

  • 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.

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades