json_api 4.0.0 copy "json_api: ^4.0.0" to clipboard
json_api: ^4.0.0 copied to clipboard

outdated

Framework-agnostic implementations of JSON:API Client (Flutter, Web and VM) and Server (VM). Supports JSON:API v1.0 (http://jsonapi.org)

example/README.md

Client-server interaction example #

Run the server:

$ dart example/server.dart 
Listening on http://localhost:8080

This will start a simple JSON:API server at localhost:8080. It supports 2 resource types:

Try opening these links in your browser, you should see empty collections.

While the server is running, try the client script:

$ dart example/client.dart 
POST http://localhost:8080/writers
204
POST http://localhost:8080/books
204
GET http://localhost:8080/books/2?include=authors
200
Book: Resource(books:2 {title: Refactoring})
Author: Resource(writers:1 {name: Martin Fowler})

This will create resources in those collections. Try the the following links:

34
likes
0
pub points
80%
popularity

Publisher

verified publisherkarapetov.com

Framework-agnostic implementations of JSON:API Client (Flutter, Web and VM) and Server (VM). Supports JSON:API v1.0 (http://jsonapi.org)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on json_api