lazyengineering / faststatus

Simple API for sharing if a resource is free, busy, or very busy
MIT License
1 stars 2 forks source link

Implement Content Negotiation #36

Open jessecarl opened 7 years ago

jessecarl commented 7 years ago

Add content negotiation to the http service. This should be used to allow the service to correctly decode request bodies and correctly encode response bodies.

Unsupported request body content type should result in a 415 response. Unsupported accept type should result in a 406.

jessecarl commented 7 years ago

There are a lot of different approaches that could work for this. It might be interesting to have something like a service with actions which do work on a decoder and an encoder.