The implementation of the ConcourseAPI struct is simply functions that make a HTTP request to the Concourse API. All these methods have the same code structure. The differences are the endpoint to be hit, the request body and the struct used to deserialize the response body.
Is there a way to write something generic? Is this a use case for macros?
The implementation of the ConcourseAPI struct is simply functions that make a HTTP request to the Concourse API. All these methods have the same code structure. The differences are the endpoint to be hit, the request body and the struct used to deserialize the response body.
Is there a way to write something generic? Is this a use case for macros?