A
A
Altimar2013-07-18 16:10:23
JavaScript
Altimar, 2013-07-18 16:10:23

POST, PUT… requests in Awesomium?

I am making an application using fresh Awesomium for Windows. All in pure C++. The window is created by CreateWindow, the browser is connected manually. In the course of work, I found out that in order for something to work, it is necessary either to enable a parameter in the settings structure, or to hang a handler on something, but I did not find the subject.

Banal cannot be processed. I found a ResourceInterceptor, it has an OnRequest handler, and it has an Awesomium::ResourceRequest* request parameter. Everything is fine, there are headers, the POST method, but how to get the data - no idea. num_upload_elements returns 0. Tech support is silent. Further worse, I also use backbone, I would like to process PUT requests with JSON content.$.post(url,{data:smth},function(res){...});

Do not write your own web server for these needs and drive traffic from one local port to another.

Has anyone come across, have thoughts on how to win?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VoidVolker, 2013-07-19
@VoidVolker

I didn’t really dig there - so far I just looked superficially, but judging by the documentation:

GetUploadElement (unsigned int idx)=0
 	Get a certain upload element (returned instance is owned by this class) 
AppendUploadFilePath (const WebString &path)=0
 	Append a file for POST data (adds a new UploadElement) 
AppendUploadBytes (const char *bytes, unsigned int num_bytes)=0
 	Append a string of bytes for POST data (adds a new UploadElement)

In theory, something from this should give data. Not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question