An HTTP Client and Server request/response handler for dealing with JSON Specification APIs. Great for Ember.js!
import github.com/derekdowling/go-json-spec-handler
Perfect middleware, or input/output handling for a new, or existing API server.
import github.com/derekdowling/go-json-spec-handler/client
HTTP Client for interacting with JSON APIs.
Implemented:
- Handles both single object and array based JSON requests and responses
- Input validation with HTTP 422 Status support via [go-validator](https://github.com/go-validator/validator)
- Client request validation with HTTP 406 Status responses
- Links, Relationship, Meta fields
- Prepackaged error responses, easy to use Internal Service Error builder
- Smart responses with correct HTTP Statuses based on Request Method and HTTP Headers
- HTTP Client for GET, POST, DELETE, PATCH
TODO:
- Reserved character checking
Not Implenting:
* These features aren't handled because they are beyond the scope of what
this library is meant to be. In the future, I might build a framework
utilizing this library to handle these complex features which require
Router and ORM compatibility.
- Relationship management
- Sorting
- Pagination
- Filtering
There are lots of great examples in the tests themselves that show exactly how it works, also check out the godocs as linked above.