Superagent: CrossDomainError with react native

Created on 31 Mar 2017  路  2Comments  路  Source: visionmedia/superagent

Superagent is a good job , it simplify much dev works.
Unfortunately, I want to build a app for ios platform with react native,but superagent always show CrossDomainError when the app send request to backend.
my dev info:
RN:0.42.3
superagent:3.5.2
PS:superagent worked fine on android app which made by rn too

Most helpful comment

@pornel Thanks for your answer so quickly, i have figured out how made this.
Because ios security policy require https rather than http , so http will be prevented and this will cause superagent to show cross domain error.
Thanks anyway again

All 2 comments

Superagent doesn't know whether the problem is really caused by cross-domain communication. It can be any problem caused by the browser or the system.

Unfortunately I don't know specifics of RN, so I can't help.

@pornel Thanks for your answer so quickly, i have figured out how made this.
Because ios security policy require https rather than http , so http will be prevented and this will cause superagent to show cross domain error.
Thanks anyway again

Was this page helpful?
0 / 5 - 0 ratings

Related issues

t3hmrman picture t3hmrman  路  9Comments

littlee picture littlee  路  8Comments

tj picture tj  路  4Comments

djechlin picture djechlin  路  6Comments

littlee picture littlee  路  5Comments