You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
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:
HTTP requests are made up of four parts. Take this example FHIR API request:
screenshot
1) Method - the action to be performed on a resource
The method indicates the action to be performed on a resource within the API.
With Iguana’s net.http.*
library, you can invoke different HTTP methods:
net.http.get{}
- query or retrieve resources.
net.http.post{}
- to add or create a resource.
net.http.put{}
- update an existing resource.
net.http.delete{}
- remove a resource.
2) Endpoint - the URL where the resource is found
The URL defines where the client can access the desired resources - for example the Patient resource.
For GET requests, the URL may also contain any necessary query parameters like the id
of the patient you are searching for.
3) Header - the metadata providing information about the request
The header includes metadata requirements defined by the API to provide information about the request. This can contain information such as:
4) Body - the payload of the request, containing the content to be sent
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 JSON, XML, or Query String format.