JNIEXPORT jstring JNICALL Java_org_cef_network_CefResponse_1N_N_1GetHeader
  (JNIEnv *env, jobject obj, jstring jheader) {
  CefRefPtr<CefResponse> response = GetCefFromJNIObject<CefResponse>(env, obj, "CefResponse");
  if (!response)
    return NULL;
  return NewJNIString(env, response->GetHeader(GetJNIString(env, jheader)));
}
示例#2
0
 void ClientAdapter::OnResourceReponse(CefRefPtr<CefBrowser> browser, const CefString& url, CefRefPtr<CefResponse> response, CefRefPtr<CefContentFilter>& filter)
 {
     IAfterResponse^ handler = _browserControl->AfterResponseHandler;
     if (handler != nullptr)
     {
         String^ cookie = toClr(response->GetHeader("Set-Cookie"));
         if (!String::IsNullOrEmpty(cookie))
         {
             handler->HandleSetCookie(cookie);
         }
     }
 }