Skip to content
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

xdomain does not support Fetch API? #198

Open
hihl opened this issue Dec 5, 2016 · 3 comments
Open

xdomain does not support Fetch API? #198

hihl opened this issue Dec 5, 2016 · 3 comments

Comments

@hihl
Copy link

hihl commented Dec 5, 2016

No description provided.

@fewiki
Copy link

fewiki commented Dec 12, 2016

I have this question too

@neatshell
Copy link

Thanks for have opened this issue cause I've lost an entire day before realizing that my stuff wasn't working because of Fetch. I've substituted it with axios and now everything works perfectly ;)

@udayklu
Copy link

udayklu commented Aug 28, 2019

HI,
Before including Xdomain.min.js in the project while fetching the stream(MemoryStream) response from WEB API using ActionResult and then converted that blob data using below code snippet into pdf file format.

var blob = new Blob([res._body], { type: 'application/pdf' });
this.fileUrl = this.sanitizer.bypassSecurityTrustResourceUrl(window.URL.createObjectURL(blob));
if (callingFrom === 'download') {
let element = this.downloadLink.nativeElement;
element.href = this.fileUrl.changingThisBreaksApplicationSecurity;
element.click();
}
Once I include Xdomain plugin in the project to fix CORS issue stream response is getting junk like below:
image

Please help me in this It's taking time but coundn't find any solution. Please respond AQAP.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants