Closed
Description
Please correct the following code from your documentation:
final httpClient = Client();
final jsonApiClient = JsonApiClient(httpClient);
final url = Uri.parse('http://localhost:8080/companies/2');
final response = await jsonApiClient.fetchCollection(url);
httpClient.close(); // Don't forget to close the http client
...
When you just copy the code in a test to get some experience how the library works, you get the following two problems:
- the construction of Client() doesn't work (anymore)
- it is also not possible to call httpClient.close()