Skip to content

Accessing third-party APIs #83

Answered by nilslice
allsey87 asked this question in Q&A
Nov 10, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

@allsey87 - That is a bit of an unfortunate side-effect of using a new technology. Many HTTP client crates will use reqwest which does have support for wasm, and its possible that the authors of the client crates for those services have hidden support behind a feature?

Another option is to find a crate that separates the request data from the HTTP transport altogether, such as https://github.com/baschoj/sendgrid-rs

Lastly, you may want to implement the requests yourself using Fetch without any client library. It is a bit more work, but at the end of the day, you will probably have a smaller wasm binary and full control over how things work.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@nilslice
Comment options

@allsey87
Comment options

@nilslice
Comment options

@nilslice
Comment options

Answer selected by allsey87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants