Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does redaxios support adaptor? #98

Open
guoyunhe opened this issue Apr 23, 2024 · 2 comments
Open

Does redaxios support adaptor? #98

guoyunhe opened this issue Apr 23, 2024 · 2 comments

Comments

@guoyunhe
Copy link

In iOS, POST body might be abandoned by the WKWebView. So in my project, we expose an different method for sending POST request. With axios, we can use adaptor to replace xhr in iOS. Does redaxios support the same feature?

{
  // `adapter` allows custom handling of requests which makes testing easier.
  // Return a promise and supply a valid response (see lib/adapters/README.md).
  adapter: function (config) {
    /* ... */
  },
}
@suhaotian
Copy link

Do you want try xior.js? You can easily create adapter: https://github.com/suhaotian/xior?tab=readme-ov-file#create-your-own-custom-plugin

Any issues free to ask, thanks :)

BTW, redaxios use fetch if didn't use polyfill, not XHR.

@guoyunhe
Copy link
Author

guoyunhe commented May 8, 2024

@suhaotian good, i will try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants