Sending requests
This guide describes how to make an HTTP request to the API endpoint
This documentation is for ARC version 16 and up.
Introduction video

The requests workspace

The requests workspace is the main part of the application. It allows you to open multiple requests in a single view. The workspace hosts tabs for the HTTP or a web socket editors. To choose between them long-press the add button in the tabs line.
Requests workspace in Advanced REST Client

Request editor

In the request editor, you build the HTTP request to make an API call. You have to provide at least the operation (HTTP method) and the URL of the API resource. The editor also allows you to define HTTP headers and the message body (when applicable to the selected operation). Here you can also define authorization strategy by configuring one of the supported authorization schemes, request actions, and request execution configuration. Finally, you can also generate code snippets for the current request.

The request URL editor

The request URL is an API endpoint URL you want to perform an operation on. The input field allows you to provide any valid URL data, like, https://api.domain.com/endpoint?param=value
URL editor in Advanced REST Client
The URL is passed to the HTTP client unprocessed to give you more control over request parameters. This means that special characters must be encoded before sending the request.
You can edit query parameters directly in the URL field but the URL editor has a convenient parameters editor to provide the values and to encode or decode URL.
Query parameters editor in Advanced REST Client
You can disable query parameters. They won't be included in the request, but they can be enabled later when needed.
When you see an error indicator in the query parameter this means that the value is invalid per URI scheme specification. Use the Encode URL button to fix the problem.
Query parameters with error indicator
Once encoded value will be encoded again producing invalid entry. When you want to encode values again, decode the values first and then encode.

API operation (HTTP method)

Typical REST operations are:
  • POST - create a resource
  • GET - read a resource or a collection of resources
  • PUT - update a resource by providing a new value to replace the old one
  • PATH - update a resource with only a part of the resource
  • DELETE - deletes a resource
There are less commonly used methods and Advanced REST Client supports them all but for the purpose of this tutorial we ignore them as probably, you won't use them.
Operation selector

HTTP headers

The headers are additional meta-information send to the server to inform it how to process the message. There are well-defined request and response headers like content-type or accept. Your API, however, may require custom headers. The headers editor allows you to define these headers.
ARC does not generate any request headers with exception of Host header which is required to make a request. Unlike other HTTP clients, only headers that are defined in the editor are sent to the server. This behaviour can be configured in the settings.
By default, you see the headers form. Add a header by clicking on the Add button. Start typing a header name. The editor renders suggestions if header name is one of the defined in the specification headers.
HTTP headers editor
Similarly to query parameters, headers can be temporarily disabled to test various options. When the toggle button is unselected then the header value is kept in the editor but it is excluded from the request.
You can switch to the text editor to enter the values manually.
HTTP headers text editor

Request body

The body is the message you want to send to the server. In RESTful APIs, this is the resource you create or update.
HTTP body raw editor
GET and HEAD methods cannot define a body on a request. Even though it is technically possible, clients probably won't work with such a request.
You don't need to set Content-Length header. It is added automatically when preparing the message. When this header is defined in the headers list it will be used instead. This way you can test your server for invalid input.
The body editor supports syntax highlighting for several content types like JSON and XML. You can switch between different types of body editors. See a related article about editing the body.

Authorization

The authorization editor supports several authorization strategies like basic scheme, OAuth 2, client certificates, and so forth. The authorization configuration is described in the related document. You can use more than a single authorization strategy at the same time.
Authorization scheme editor
When selecting a strategy don't forget to enable it in the selector or otherwise it won't be used with the request.

Request actions

Request actions are the ARC's way to perform some tasks when the request is executed. Actions are executed before and after the request updating your environment. Actions can be conditionally executed, meaning the action runs when a specified condition on the request data is met. For example, you can check whether a response has the desired status and set a variable from the response body. You can learn more about request actions in the dedicated section.
Request actions in Advanced REST Client

Per request configuration

In the request editor, you can set a per request configuration options that override the global settings for the HTTP request processing.
HTTP request execution configuration
Last modified 9mo ago