-
Notifications
You must be signed in to change notification settings - Fork 407
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
Use fetch #541
Use fetch #541
Conversation
I think there is a problem due to nock/nock#2397? |
I think we can change the test library to |
Nock is a mock library that was originally chosen by the first author of line-bot-sdk-nodejs. We are using it just because it was initially used, and we don't have a strong preference for it. Switching to MSW would not be a problem. |
nock doesn't support `window.fetch`. As a result, #541 failes. So, it's time to use MSW!
Ah, I didn't notice so I did it. |
There seems to be a problem with file uploads and some assertions (9 more tests to pass!) |
@k-kozika can you fix it? |
I can't do it, can you do it? |
I had a hard time modifying the test cases, so I created a PR that directly implements fetch code in the OpenAPI-based code generation. #582 |
@k-kozika @tokuhirom |
As a result of neglecting #582, it became impossible to merge, so I recreated the Pull-request. Compared to the last time, we developed it by narrowing down the changes to make it less likely to cause conflicts. ## Development steps 1. make axios as a optionalDependency 2. move http.ts as http-axios.ts 3. create new http-fetch.ts as a result, legacy API will depends on the `http-axios.ts`. and so openapi based clients are depend on `http-fetch.ts`.
Note this change won't be merged in master branch. A series of changes (#723) resolved finally. |
Solve #531