ssi icon indicating copy to clipboard operation
ssi copied to clipboard

Did web http client

Open vdods opened this issue 11 months ago • 0 comments

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) or DIDWeb::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.

vdods avatar Jul 28 '23 21:07 vdods