Courses Client
A utility class with methods for getting resources from a remote. For most use cases, the CoursesClient.fetch methods are sufficient. The CoursesClient.fetchAndMap and CoursesClient.fetchAndConsume methods can be used when direct access to the input stream of the response is needed.
Types
A functional interface for adding authentication to an HTTP request.
A functional interface for functions that consume a HttpResponse and use it for side-effects.
A functional interface for functions that map a HttpResponse to a desired result. // * See EntityUtils for useful methods for working with HttpEntity instances.
Properties
Functions
Makes a GET request to the given URL and returns the response body in a ByteArrayInputStream.
Downloads a file from the given URL into the given file.
Makes a GET request to the given URL and consumes the response.
Makes a GET request to the given URL and returns the mapped response.
Throws a UnexpectedResponseException if the response status code isn't 2xx. If the response body includes JSON with an array for the key "errors" or a string for the key "detail", then those messages are included in the exception message.