We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to chain many unirest calls one after another where by I make decisions based on the previous rest call.
The problem is normal patterns I normally use don't work with unirest and I am trying to work out why.
what seems to happen is the .then is not respected
await unirest.get("https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials").headers({ "x-rapidapi-key": process.env.RAPITOKEN, "x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com", "useQueryString": true }).query({ "symbol": TICKER, "region": "US" }).then( async (resFIN) => { <nest unirest request here> }
another pattern I tried is var something = await unirest.get("https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials").headers({ "x-rapidapi-key": process.env.RAPITOKEN, "x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com", "useQueryString": true }).query({ "symbol": TICKER, "region": "US" }).then( async (resFIN) => { <nest unirest request here> }
var something = await unirest.get("https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials").headers({ "x-rapidapi-key": process.env.RAPITOKEN, "x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com", "useQueryString": true }).query({ "symbol": TICKER, "region": "US" }).then( async (resFIN) => { <nest unirest request here> }
What I get back in this situation is defined.
when I try https://stackoverflow.com/questions/39604262/returning-a-promise-from-the-unirest-client
I don't get the body back. I only get the request details made.
Is there something I am missing about unirest
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am trying to chain many unirest calls one after another where by I make decisions based on the previous rest call.
The problem is normal patterns I normally use don't work with unirest and I am trying to work out why.
what seems to happen is the .then is not respected
await unirest.get("https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials").headers({ "x-rapidapi-key": process.env.RAPITOKEN, "x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com", "useQueryString": true }).query({ "symbol": TICKER, "region": "US" }).then( async (resFIN) => { <nest unirest request here> }
another pattern I tried is
var something = await unirest.get("https://apidojo-yahoo-finance-v1.p.rapidapi.com/stock/v2/get-financials").headers({ "x-rapidapi-key": process.env.RAPITOKEN, "x-rapidapi-host": "apidojo-yahoo-finance-v1.p.rapidapi.com", "useQueryString": true }).query({ "symbol": TICKER, "region": "US" }).then( async (resFIN) => { <nest unirest request here> }
What I get back in this situation is defined.
when I try https://stackoverflow.com/questions/39604262/returning-a-promise-from-the-unirest-client
I don't get the body back. I only get the request details made.
Is there something I am missing about unirest
The text was updated successfully, but these errors were encountered: