* First version of supporting non-string requests
* Clean up
* Minor cleanup
* Simplify to directly export the stream
* Add nl
* Clean up & add more testing
Co-authored-by: sigma-andex <sigma.andex@pm.me>
* v0.8.1
* Add failing tests for `Headers`
There's currently a bug with `Headers`:
if a header is created with uppercase characters, it can never be found.
The problem is that we only look for lowercase characters in the
`Lookup` instance for `Headers`.
* Convert `Headers` to use `CaseInsensitiveString`
In an effort to be more true to HTTP,
we make the header keys case-insensitive.
This fixes the issue of looking up a header where the casing is different,
Since `CaseInsensitiveString`s compare in a way that ignore casing.
The API for consumers for `Headers` stays the same,
but we get more correct code.
A win for all!
* v0.8.1
* Add the HTTP version to `Request`
The `node-http` `Request` has the HTTP version on it.
We can make it available in our `Request` for consumers.
We went the naive approach first and typed it as a string.
There is some structure to the version,
so we could attempt to parse it.
It's unclear what we would do if parsing failed though.
Maybe we want something like:
```PureScript
data Version
= Known { major :: Int, minor :: Int }
| Unknown String
```
That would allow us to parse the known format,
and fallback to accepting anything else.
It's definitely something to discuss anyway.
* Make HTTP version its own data type
There are only a handful of HTTP versions that are commonly used.
We can talk about those explicitly and fallback to any arbitrary version.
The changes here try to follow the patterns elsewhere in the code base.
Hopefully, it's not too far off.
* Represent emtpy query parameters as empty strings instead of "true"
* Encode and decode query params
Fixes#126
* Pass invalid query parameters through instead of ignoring them
* Decode the plus sign `+` as a space ` ` in query string
* Decode percent encoding in path segments
* Update History.md
* Chunked responses
* Remove Chunked newtype wrapper around Streams
* Use child process instead of ffi stream for chunked example
* Rename additionalHeaders to defaultHeaders
* Add History.md entry
* General cleanup
* Support binary response body
Fixes#98
* Address PR comments
- Expose data constructors for Body and use them for construction and
pattern matching instead of various helpers
- Add an example and integration test for binary response
- Adjust the middleware example to be a bit nicer
- Upgrade all dependencies
- Use Effect instead of Eff
- Use Foreign.Object instead of StrMap
- Use Effect.Ref instead of Control.Monad.ST
- Drop SecureServerM, it's the same as ServerM now