5.0.0
This release accomplishes two goals.
- The
RequestBuilder
type is no longer opaque. This comes after observing
much debate in the community over the merits and drawbacks of hiding details of
a library's types from the user. In this case I have determined it no longer
makes sense to do so. IfRequestBuilder
is opaque and so isHttp.Request
,
there is no longer any opportunity to do introspection, write tests, or create
tooling around theRequestBuilder
type. So we simply expose the internal
structure ofRequestBuilder
as a record. - We're taking over the
send
function again. Thanks to a pull request by @s60
I am convinced that this will be okay. We can still have the same signature for
send
, and then use tasks inside ofsend
to mess around and do extra stuff.
This will just require that the docs fortoRequest
be very clear that it is
lossy with respect toHttpBuilder
features. So far there is one new feature
that is being brought over from the previous versions,withCacheBuster
. This
will be a foundation for bringing back other stuff and adding new things as
well.
Removals
None
Breaking Changes
RequestBuilder a
is no longer opaque
Additions
toTask
: Convert yourRequestBuilder a
into aTask Http.Error a
with all
the extras thatHttpBuilder
has and will have to offer.withCacheBuster
: append a cache buster query param with the current
timestamp to your request's URL.