ResourceHandler

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

ResourceHandler

Postby vegas2ny » Thu Sep 06, 2018 8:24 am

Hello,

I have configured a resource handler, after making the request, the call back methods are called, for example "GetReponse" and "GetResponseHeaders" The problem is after "ProcessRequestAsync" is called, no request is actually made and the response is always empty, also the response headers collection count is always 0. I have double checked this by looking in fiddler and confirmed that a request is never being made after ProcessRequestAsync is called. My ProcessRequestAsync method contents are below. I'm not sure what should be done to fully manage the request, or even send it at this point. I really appreciate any help on this, and it would be great if someone could provide a code sample on how to fully utilize the resource handler. Thank you.

public virtual bool ProcessRequestAsync(IRequest request, ICallback callback)
{
callback.Continue();

return true;
}
vegas2ny
Newbie
 
Posts: 2
Joined: Sat Aug 25, 2018 3:06 pm

Re: ResourceHandler

Postby Czarek » Thu Sep 06, 2018 11:56 am

There is no 'ProcessRequestAsync' callback in CEF. This forum is for C/C++ bindings to CEF. You can see CEF unit tests for reference:

https://github.com/chromiumembedded/cef ... st.cc#L473
https://github.com/chromiumembedded/cef ... t.cc#L1764
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: ResourceHandler

Postby vegas2ny » Thu Sep 06, 2018 12:21 pm

Hello,

Thank you for the feedback, i am using Cefsharp. I guess i really asking for a understanding of what needs to be done in this file. I know that this file is for me to manually process the request so i guess i am asking what needs to happen for me to "manually process" the request and response. The links you gave me to the example, are they fully functional and working, or are they just examples?

Thanks
vegas2ny
Newbie
 
Posts: 2
Joined: Sat Aug 25, 2018 3:06 pm

Re: ResourceHandler

Postby Czarek » Thu Sep 06, 2018 12:35 pm

You have to carefully read doc comments in CEF sources:
https://github.com/chromiumembedded/cef ... dler.h#L48
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 47 guests