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

Access denied on POST xhr #2

Open
kpetrianakis opened this issue Jul 20, 2016 · 5 comments
Open

Access denied on POST xhr #2

kpetrianakis opened this issue Jul 20, 2016 · 5 comments

Comments

@kpetrianakis
Copy link

Hello, this is great to learn how to intercept xhr on UWP.

However, POST requests give me an access denied error. Are they supposed to work for you?

Thanks

@altso
Copy link
Owner

altso commented Jul 20, 2016

@kpetrianakis no, POST didn't work for me as well. Anyways, you won't be able to access the body of the request as IUriToStreamResolver doesn't provide this info. We came up with an interceptor on the client side (JS) that converts all POST requests to GET and puts a body in a query string as a parameter. Obviously, it's not a perfect workaround, but we were able to use that.

@kpetrianakis
Copy link
Author

Thanks for the quick reply mate.
I had the same idea... I will implement it soon. I also voted up the feature of getting the POSTs in the future.
Have you come across any other workaround?

@altso
Copy link
Owner

altso commented Jul 21, 2016

I believe you can run an http proxy for you application and intercept whatever you need. I haven't tried that though.

@kpetrianakis
Copy link
Author

What do you mean? An HTTP server inside the app that will serve the local pages and will request them by HttpClient?
Or what else?

@altso
Copy link
Owner

altso commented Aug 4, 2016

Yes, I meant local HTTP server.

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

2 participants