Releases: hoodunit/purescript-payload
Releases · hoodunit/purescript-payload
v0.4.0: 0.14.x bump, optional POST bodies
v0.3.1: Support OPTIONS, small fixes/adjustments
- Support OPTIONS method.
- Remove support for query string literals (e.g.
/foo?myliteral
) in favor of query keys, which support all of the same use cases. - Run server by default on 0.0.0.0 instead of localhost.
- Fix: On failures decoding query parameters and bodies, return 400 Bad Request instead of forwarding to the next route.
- Fix: handle top-level routes like any other parent routes and actually apply guards and pass parameters to child routes.
v0.3.0: Client improvements and small features
General:
- Support optional query parameters by giving type as 'Maybe a'
- Fix bug in query parameter parsing where duplicate or array query parameters would cause an internal server error.
- Show more sensible errors when parent route paths are invalid.
Client-only:
- Support encoding Boolean query parameters
- Send appropriate "content-type" header with all payload-bearing requests.
- URL-encode URL and query parameters
- Add option for adding extra headers to all requests. Example use cases: authentication headers, shared content-type headers, shared accept headers, API version headers.
- Add option for setting client log level, and when using the debug log level, print raw client requests and responses. If the response is JSON, attempt to pretty print the JSON.
- Add helpers for unwrapping response bodies and responses without handling errors. This is to make it easy simply grab a body or a response in cases where throwing the error is the correct handling of the error or e.g. earlier in development.
v0.2.0: API clients
Adds full client support for API spec requests, including the following changes:
- Deriving client functions for calling an API given a spec (including APIs that are not written with Payload)
- Client and server support for query multi-matches (or wild card matches - matching all remaining query items)
- Spec syntax changes to be more explicit and clear
- Various other tweaks
v0.1.0: Initial release
Initial release with support for:
- Request routing
- Decoding URL parameters, query parameters, and request bodies
- Encoding response bodies
- Request guards
- Serving files and directories