-
Notifications
You must be signed in to change notification settings - Fork 4
Home
There are only 5 key protocols to be aware of:
This is the root of a given request.
It defines all the basic properties that a request will have. Most notably, it defines the baseURL.
A WebService can also customize a number of things. Most of these things are defined as instance methods and properties so that you can customize them based on the environment (e.g. Dev, Test, and Prod).
In most projects, you will only ever have to define a single WebService unless you are communicating with multiple services.
When you declare an endpoint, you will choose between 4 different kinds:
- EmptyEndpoint: This endpoint has no input or output and only succeeds or fails based on the default response validation.
- InEndpoint: This endpoint only has input.
- OutEndpoint: This endpoint only has output.
- InOutEndpoint: This endpoint has both input and output.
When you declare an endpoint, it should implement one, and only one, of these protocols.
Once you declare a type that implements either the WebService protocol or one of the Endpoints, the compiler should help you out with the rest. You can also take a look the README to see some examples.
However, for some extra information, check out the following pages: