Could you please help to submit a feature request about this at 
https://crosswalk-project.org/jira/?

Regards,
Xing

From: Crosswalk-dev [mailto:crosswalk-dev-boun...@lists.crosswalk-project.org] 
On Behalf Of Rafael Almeida
Sent: Thursday, September 17, 2015 3:20 PM
To: crosswalk-dev@lists.crosswalk-project.org
Subject: [Crosswalk-dev] Intercept PUT requests

Hi,

We would like to intercept a PUT request and depending on the existence of a 
HTTP Header "X" we then :
1) compress the image being uploaded
2) create a new connection/request and upload the compressed image instead of 
the original

We have considered using the method "shouldInterceptLoadRequest", but we fond 
the following issues/shortcomings:

1) We don't have access to the HTTP headers

2) We don't have access to any request details.. we need the request body 
content, to be able to access the file being uploaded.

We have this implemented in iOS as a NSURLProtocol

We would like to hear your ideas as how we could accomplish this with XWalk on 
Android?

Using the platform web view on Android >= 5 we can use the WebResourceRequest 
object to get the headers and method, but we don't have access o the file being 
uploaded.

Best Regards,
Rafael Almeida



_______________________________________________
Crosswalk-dev mailing list
Crosswalk-dev@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to