hi roschuma,
you have definitely right, i'm new in rsdk so many thing seems confused to me. I just realize that i need something like interceptor. My goal is to display in browser that site status is Forbidden when i get to the google.com. (like in this example http://blogs.msdn.com/b/vcblog/archive/2013/07/10/intercepting-http-request_2f00_response-using-c_2b002b00_-rest-http-library.aspx) ->butt i can get it work.
This is what i already try to intercept google and display in browser that site is Forbidden
void IntercetGoogle()
{
``` This code don't work it want display in browser that site is Forbidden, why?
you have definitely right, i'm new in rsdk so many thing seems confused to me. I just realize that i need something like interceptor. My goal is to display in browser that site status is Forbidden when i get to the google.com. (like in this example http://blogs.msdn.com/b/vcblog/archive/2013/07/10/intercepting-http-request_2f00_response-using-c_2b002b00_-rest-http-library.aspx) ->butt i can get it work.
This is what i already try to intercept google and display in browser that site is Forbidden
void IntercetGoogle()
{
auto testAuthStage =
[](http_request request, std::shared_ptr<http_pipeline_stage> next_stage) -> pplx::task < http_response >
{
http_response response;
response.set_status_code(status_codes::Forbidden);
wcout << response.extract_string().get() << endl;
return pplx::task_from_result(response);
};
http_client client(L"http://google.com");
client.add_handler(testAuthStage);
}``` This code don't work it want display in browser that site is Forbidden, why?