Releases: ipld/go-trustless-utils
v0.4.1
v0.4.0
What's Changed
This is a breaking change as the signature of CheckFormat()
has changed from func(*net/http.Request) (ContentType, error)
to func(*net/http.Request) ([]ContentType, error)
; i.e. it now returns a slice of ContentType
object. This slice is priority ordered and only contains compatible content types for Trustless Gateway requests but they may be either requests for a CAR or a Raw block. The content types come from either the Accept
request header or the format
parameter. It should be safe for a caller to select the first supportable format from the list; i.e. if a caller can support both CAR and Raw responses, choose the first element of the slice (where there is no error, the slice will always be of length >= 1).
ContentType
now has IsCar() bool
and IsRaw() bool
.
Full Changelog: v0.3.1...v0.4.0
v0.3.1
What's Changed
- chore(deps): bump github.com/ipfs/go-unixfsnode from 1.8.0 to 1.8.1 by @dependabot in #13
- chore(deps): bump github.com/ipfs/go-unixfsnode from 1.8.1 to 1.9.0 by @dependabot in #14
- fix(correctedmemstore): pass CID to ErrNotFound by @rvagg in #15
New Contributors
- @dependabot made their first contribution in #13
Full Changelog: v0.3.0...v0.3.1
v0.3.0
v0.2.0
What's Changed
feat!: add ContentType, expanded Accept parsing by @rvagg in #6
ContentType
was added to represent a full Trustless Gateway content type for use asContent-Type
header andAccept
headerCheckFormat()
,ParseAccept()
andParseContentType()
have all changed signatures to incorporateContentType
ParseAccept()
now returns an preferentially ordered list of compatible Trustless Gateway content typesResponseContentTypeHeader()
andRequestAcceptHeader()
have been deprecated, preferContentType#String()
instead, withDefaultContentType().WithDuplicates(duplicates).String()
replicating the original behaviour of these two functions.
Full Changelog: v0.1.0...v0.2.0
v0.1.0
v0.0.0
Full Changelog: https://github.com/ipld/go-trustless-utils/commits/v0.0.0