Skip to content

Correct documentation in JsonApiClient class #73

Closed
@pueffl

Description

@pueffl

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions