ssi
ssi copied to clipboard
Did web http client
This adds the HTTP client as discussed in https://github.com/spruceid/ssi/issues/516
Note that this is a breaking change because of the semantics of the DIDWeb struct:
- Currently, DIDWeb is an empty struct and can be instantiated as
DIDWeb
by itself (no{}
needed), and appears in various places as&DIDWeb
. - This change requires DIDWeb to be instantiated via methods
DIDWeb::new_with_default_http_client
(this is the drop-in replacement for existing functionality) orDIDWeb::new_with_http_client
(if you want to specify your own HTTP client).
I altered the various call sites that were using &DIDWeb
, and changed them to use an instance created with DIDWeb::new_with_default_http_client
. However, codebases downstream of ssi that use DIDWeb will need to update their uses of DIDWeb (e.g. when constructing a DIDMethods) in order to integrate this change.