-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
superagent not working as expected with CHROME #1390
Comments
In general, we do not have any known problems with Chrome. 100% of our 198 tests pass in Chrome. The code looks like from a test, not from actual superagent use. As it stands, this test is meaingless — it has no assertion, and doesn't even wait for the result. Also you haven't provided any specific information about how chrome fails, what was expected and acutal result, and relevant information such as http headers from the client and the server. |
@kornelski This test is an example. And as mentioned, I don't want to assert or do anything. Just want to print response. Test passes with no errors when browser is chrome. And superagent can be use in multiple ways. So here I want to use it to print response from api mentioned in Thanks |
So for purpose of printing the code looks fine. I can't help you without specific description of what doesn't work, what should work, and what HTTP headers superagent has sent and received (from Chrome's network inspector or tcp dump). |
@palakdesai7 From your test seems like it is not waiting for the response (super agent is completely async). If your are using mocha, you can return the whole expression as mocha is promise-aware and superagent returns promises. |
@jonathansamines Thanks I will try that. |
v5.0.0 was just released to NPM and an updated README is now available here on GitHub (see https://github.com/visionmedia/superagent#superagent). What's new
How to installnpm install superagent@latest
yarn add superagent@latest PolyfillsPlease see the Required Browser Features section in the README if you plan to support IE 9 and/or IE 10 and use |
I am trying to print response from a API. very simple. Works fine when I run below script with Firefox.
code is something like this:
Any one facing issues with chrome and superagent.
Thanks
The text was updated successfully, but these errors were encountered: