Rank: Newbie Groups: Member
Joined: 3/30/2014 Posts: 5
|
Hello,
We are evaluating your web browser component right now, it is definitely a masterpiece. However I have fail to find way how to access data post by ajax request in custom resource handler. I expected to see something in PostData but there are no items at all.
I'm using this javascript for test : <script type="text/javascript"> var jsobject = {value:"abc"}; var data = JSON.stringify(jsobject); jQuery.ajax({ url: "embedded://api", type: "POST", data: data, contentType: "application/json", success: success, }); </script>
As fast workaround I changed method to GET and capable to get sent data as a part of url, but as I know the size of data is limited to 4KB and it might need to send more.
Could you please advice something?
Thank you in advance, Ruslan
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We have looked into this. The reason that you do not see the post data is because WebKit explicitly verifies that "POST" can only be used with HTTP protocol. That is, the scheme must be "http" or "https". For any other protocol it drops the post data. So you might still want to use http protocol. You can still use a custom ResourceHandler to catch all requests and process them the way you wanted.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 3/30/2014 Posts: 5
|
Thanks a lot! Works like a charm!
|