You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this SDK in a project running on Cloudflare Workers which is not a native Node runtime. Axios expects either XMLHttpRequest or Node's http module to be available which causes an error since Cloudflare Workers only supports the standard Fetch API.
Proposal
Axios accepts custom adapters to provide the underlying http client implementation. The adapter is specified within Request Config. I would like to customize the Axios client instance by passing in additional options to the WorkOS constructor. This could be done by passing in a Axios instance or the Request Config used to create the Axios instance. This would also be useful to create mock implementation for testing.
Problem
I'm using this SDK in a project running on Cloudflare Workers which is not a native Node runtime. Axios expects either
XMLHttpRequest
or Node'shttp
module to be available which causes an error since Cloudflare Workers only supports the standard Fetch API.Proposal
Axios accepts custom adapters to provide the underlying http client implementation. The adapter is specified within Request Config. I would like to customize the Axios client instance by passing in additional options to the WorkOS constructor. This could be done by passing in a Axios instance or the Request Config used to create the Axios instance. This would also be useful to create mock implementation for testing.
For example,
The text was updated successfully, but these errors were encountered: