Setting the Endpoint
A REST endpoint is the first part of the URI and it specifies the location at which the various resources of the API can be found.
When instantiating a
The https://petstore.swagger.io/v2/ part is the endpoint, which is where the API is found, and it contains multiple resources. The /pet/3 part is the specific resource we are accessing. Together they make up the URI; however it is the endpoint part we need to provide in the create method of the JadeRestClient object, as follows.
client := create JadeRestClient("https://petstore.swagger.io/v2/");
If you want to change the endpoint of an existing JadeRestClient object, you can use the
client.setEndpoint("https://petstore.swagger.io/v2/");