Configure Settings for REST
This topic describes how to control the settings when working with REST APIs. Before reviewing this material, check out Try Out SwaggerHub Explore and Explore REST APIs.
Set Request Parameters
Headers and Parameters
The Headers & Parameters control displays by default. You can update parameters as follows:
Enter parameters in the Path field.
Add new parameters to the table.
Change current parameter settings.
The following image shows the Headers & Parameters table.
Authorization settings
If your API requires authentication, use the Authorization Settings tab to specify your authorization type and your corresponding credentials.
The following image shows the Authorization Settings panel.
Body settings
In SwaggerHub Explore the body of an API request is in JSON format by default. The following image shows the menu to change the body request format to XML or plain text.
You can type text into the Body text box or paste text in.
Connection settings
You use the Connection Settings panel to configure the following settings:
Enable URL Encoding
Follow Redirects
Timeout
The following image shows the Connection Settings panel.
View Responses
SwaggerHub Explore displays the response body at the bottom of the main work area. Click Headers to display the response headers, instead of the body. The following image shows the Headers option located at the left side of the Response section.
View the Raw Data Stream
You have the option to view the raw data stream in SwaggerHub Explore, instead of parsed output. Simply click the Raw mode slider at the top right of the work area.