Skip to content

Refactor all HTTP requests to use axios #975

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

Closed
siddhant1 opened this issue Mar 23, 2019 · 8 comments · Fixed by #1763
Closed

Refactor all HTTP requests to use axios #975

siddhant1 opened this issue Mar 23, 2019 · 8 comments · Fixed by #1763
Labels
Good First Issue A beginner-friendly issue, great for first-time contributors Help Wanted Would love additional input or contributions! Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance

Comments

@siddhant1
Copy link
Contributor

As I was working on #521 , we use a package named 'request' which only supports callbacks.
I think we should switch to request-promise alternative.
LInks :- https://github.com/petkaantonov/bluebird
https://github.com/request/request-promise-native

@meiamsome @catarak Should I switch it up?

@catarak catarak changed the title Switch to react-promise Switch to request-promise Mar 25, 2019
@catarak
Copy link
Member

catarak commented Mar 25, 2019

request-promise is already a dependency, so feel free to refactor accordingly.

@catarak catarak changed the title Switch to request-promise Refactor request to request-promise in controllers Mar 25, 2019
@catarak catarak added the Type:Task Tasks tied specifically to developer operations and maintenance label Mar 25, 2019
@siddhant1
Copy link
Contributor Author

Cool , I will have a look

@catarak catarak changed the title Refactor request to request-promise in controllers Refactor all HTTP requests to use axios Feb 10, 2021
@catarak
Copy link
Member

catarak commented Feb 10, 2021

There are a bunch of different request libraries used in this project (request, request-promise, axios). Since axios works both client-side and server-side, this project should just use it.

@catarak catarak added Good First Issue A beginner-friendly issue, great for first-time contributors Priority:High Should be addressed soon but not critical Help Wanted Would love additional input or contributions! labels Feb 10, 2021
@SundeepChand
Copy link
Contributor

Hello @catarak, can I work on this?

@catarak
Copy link
Member

catarak commented Feb 11, 2021

@SundeepChand absolutely! I also think this is a good fit for you since it touches a few files and you're familiar with the codebase.

SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 12, 2021
@SundeepChand
Copy link
Contributor

SundeepChand commented Feb 12, 2021

@catarak, where can I find the Personal Access Token to make requests to the public API? And how can I get EDITOR_API_ACCESS_TOKEN to run fetch-examples-ml5.js

SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 12, 2021
SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 12, 2021
SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 15, 2021
SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 15, 2021
SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 15, 2021
@catarak
Copy link
Member

catarak commented Feb 16, 2021

@catarak, where can I find the Personal Access Token to make requests to the public API? And how can I get EDITOR_API_ACCESS_TOKEN to run fetch-examples-ml5.js

@SundeepChand ahh sorry that is confusing! the idea is that eventually, users (such as ml5) will be able to generate their own access tokens to upload sketches programatically. the way you would generate this token is to create an ml5 account on your local database, login as that user, then go to settings > access tokens, and then generate a token.

@SundeepChand
Copy link
Contributor

SundeepChand commented Feb 17, 2021

Thanks @catarak! I was able to create a token and was able to run fetch-examples-ml5.js, but its giving some errors that has to be fixed. PS: Finally I've figured out cause of the error, will be updating the PR soon.

SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 19, 2021
SundeepChand added a commit to SundeepChand/p5.js-web-editor that referenced this issue Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue A beginner-friendly issue, great for first-time contributors Help Wanted Would love additional input or contributions! Priority:High Should be addressed soon but not critical Type:Task Tasks tied specifically to developer operations and maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants