A request is an action we send to interact with a web service, whether you are authenticating or interacting with the resource server. Working with requests is required if Iguana is acting as either the:
Client - building requests to be sent to the Server.
Server - listening for incoming requests and parsing them for processing.
HTTP requests are made up of four parts. Take this example client request to a FHIR API request: screenshot
...
Expand | ||
---|---|---|
| ||
The method indicates the action to be performed on a resource within the API. With Iguana’s
|
Expand | ||||
---|---|---|---|---|
| ||||
The URL defines where the client can access the desired resources - for example the Patient resource.
Query String: For GET requests, the URL may also contain any necessary query parameters like the id of the patient you are searching for. . The
These URLs can be hardcoded if necessary, or built using various URL Encoding strategies. |
Expand | ||
---|---|---|
| ||
The header includes metadata requirements defined by the API to provide information about the request.
This can contain information such as:
|
Expand | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
Some requests (PUT and POST) require a body where we add the resource content or additional information to be sent to the server. This can be in a few potential formatsThe HTTP formats will typically be specified by the API you’re working with and often requires the appropriate Content-Type header. Common formats include: JSON
XML
Query String format
Form Data
Form data for data sent from a web form. Typically handled in Lua using string or table functions, storing data as name-value pairs. |