P5.js-web-editor: Refactor all HTTP requests to use axios

Created on 23 Mar 2019  路  8Comments  路  Source: processing/p5.js-web-editor

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?

good first issue help wanted high task

All 8 comments

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

Cool , I will have a look

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.

Hello @catarak, can I work on this?

@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.

@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

@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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BlinfoldKing picture BlinfoldKing  路  3Comments

AltoRetrato picture AltoRetrato  路  4Comments

aldrinjenson picture aldrinjenson  路  4Comments

aparrish picture aparrish  路  5Comments

runemadsen picture runemadsen  路  5Comments