Home
last modified time | relevance | path

Searched refs:http_response (Results 1 – 25 of 40) sorted by relevance

12

/external/cronet/net/test/embedded_test_server/
Ddefault_handlers.cc55 auto http_response = std::make_unique<BasicHttpResponse>(); in HandleDefaultConnect() local
56 http_response->set_code(HTTP_BAD_REQUEST); in HandleDefaultConnect()
57 http_response->set_content( in HandleDefaultConnect()
59 http_response->set_content_type("text/html"); in HandleDefaultConnect()
60 return http_response; in HandleDefaultConnect()
66 auto http_response = std::make_unique<BasicHttpResponse>(); in HandleCacheTime() local
67 http_response->set_content("<!doctype html><title>Cache: max-age=60</title>"); in HandleCacheTime()
68 http_response->set_content_type("text/html"); in HandleCacheTime()
69 http_response->AddCustomHeader("Cache-Control", "max-age=60"); in HandleCacheTime()
70 return http_response; in HandleCacheTime()
[all …]
Drequest_handler_util.cc235 auto http_response = std::make_unique<BasicHttpResponse>(); in HandleFileRequest() local
236 http_response->set_code(HTTP_OK); in HandleFileRequest()
247 http_response->set_code(HTTP_PARTIAL_CONTENT); in HandleFileRequest()
248 http_response->AddCustomHeader( in HandleFileRequest()
257 http_response->set_content_type(GetContentType(file_path)); in HandleFileRequest()
258 http_response->AddCustomHeader("Accept-Ranges", "bytes"); in HandleFileRequest()
259 http_response->AddCustomHeader("ETag", "'" + file_path.MaybeAsASCII() + "'"); in HandleFileRequest()
260 http_response->set_content(file_contents); in HandleFileRequest()
261 return http_response; in HandleFileRequest()
Dembedded_test_server.cc72 auto http_response = std::make_unique<BasicHttpResponse>(); in ServeResponseForPath() local
73 http_response->set_code(status_code); in ServeResponseForPath()
74 http_response->set_content_type(content_type); in ServeResponseForPath()
75 http_response->set_content(content); in ServeResponseForPath()
76 return http_response; in ServeResponseForPath()
93 auto http_response = std::make_unique<BasicHttpResponse>(); in ServeResponseForSubPaths() local
94 http_response->set_code(status_code); in ServeResponseForSubPaths()
95 http_response->set_content_type(content_type); in ServeResponseForSubPaths()
96 http_response->set_content(content); in ServeResponseForSubPaths()
97 return http_response; in ServeResponseForSubPaths()
Dembedded_test_server_unittest.cc159 auto http_response = std::make_unique<BasicHttpResponse>(); in HandleRequest() local
160 http_response->set_code(code); in HandleRequest()
161 http_response->set_content(content); in HandleRequest()
162 http_response->set_content_type(content_type); in HandleRequest()
163 return http_response; in HandleRequest()
/external/python/apitools/apitools/base/py/
Dexceptions.py81 def FromResponse(cls, http_response, **kwargs): argument
83 status_code = int(http_response.info.get('status'))
87 return error_cls(http_response.info, http_response.content,
88 http_response.request_url, **kwargs)
189 def FromResponse(cls, http_response, **kwargs): argument
190 return cls(http_response.info, http_response.content,
191 http_response.request_url, http_response.retry_after,
Dbase_api.py598 def __ProcessHttpResponse(self, method_config, http_response, request): argument
600 if http_response.status_code not in (http_client.OK,
604 http_response, method_config=method_config, request=request)
605 if http_response.status_code == http_client.NO_CONTENT:
608 http_response = http_wrapper.Response(
609 info=http_response.info, content='{}',
610 request_url=http_response.request_url)
612 content = http_response.content
712 http_response = None
714 http_response = upload.InitializeUpload(
[all …]
Dbase_api_test.py124 http_response = http_wrapper.Response(
129 method_config, http_response))
132 http_response.content,
133 service.ProcessHttpResponse(method_config, http_response))
143 http_response = http_wrapper.Response(
148 method_config, http_response))
151 http_response.content.decode('utf8'),
152 service.ProcessHttpResponse(method_config, http_response))
Dtransfer.py893 http_response = http_wrapper.MakeRequest(http, http_request,
895 if http_response.status_code != http_client.OK:
896 raise exceptions.HttpError.FromResponse(http_response)
898 self.__server_chunk_granularity = http_response.info.get(
900 url = http_response.info['location']
909 return http_response
Dbatch.py125 def HandleResponse(self, http_response, exception): argument
137 self.__http_response = http_response
/external/cronet/components/cronet/testing/test_server/
Dtest_server.cc47 auto http_response = std::make_unique<net::test_server::BasicHttpResponse>(); in SimpleRequest() local
48 http_response->set_code(net::HTTP_OK); in SimpleRequest()
49 http_response->set_content(kSimpleResponse); in SimpleRequest()
50 return std::move(http_response); in SimpleRequest()
60 auto http_response = std::make_unique<net::test_server::BasicHttpResponse>(); in UseEncodingInResponse() local
70 http_response->set_code(net::HTTP_OK); in UseEncodingInResponse()
71 http_response->set_content(quickfoxCompressedStr); in UseEncodingInResponse()
72 http_response->AddCustomHeader(std::string("content-encoding"), in UseEncodingInResponse()
75 return std::move(http_response); in UseEncodingInResponse()
96 auto http_response = std::make_unique<net::test_server::BasicHttpResponse>(); in SetAndEchoCookieInResponse() local
[all …]
/external/google-breakpad/src/client/windows/sender/
Dcrash_report_sender.cc70 int http_response = 0; in SendCrashReport() local
73 &http_response); in SendCrashReport()
78 } else if (http_response >= 400 && http_response < 500) { in SendCrashReport()
/external/grpc-grpc/src/core/ext/filters/client_channel/
Dhttp_connect_handshaker.cc62 grpc_http_response http_response; member
78 grpc_http_response_destroy(&handshaker->http_response); in http_connect_handshaker_unref()
206 if (handshaker->http_response.status < 200 || in on_read_done()
207 handshaker->http_response.status >= 300) { in on_read_done()
210 handshaker->http_response.status); in on_read_done()
344 &handshaker->http_response); in grpc_http_connect_handshaker_create()
/external/cronet/net/url_request/
Durl_request_quic_perftest.cc85 auto http_response = std::make_unique<test_server::BasicHttpResponse>(); in HandleRequest() local
88 http_response->AddCustomHeader( in HandleRequest()
91 http_response->set_code(HTTP_OK); in HandleRequest()
92 http_response->set_content(kHelloOriginResponse); in HandleRequest()
93 http_response->set_content_type("text/plain"); in HandleRequest()
94 return std::move(http_response); in HandleRequest()
Dhttp_with_dns_over_https_unittest.cc216 auto http_response = std::make_unique<test_server::BasicHttpResponse>(); in HandleDefaultRequest() local
218 http_response->set_content(kTestBody); in HandleDefaultRequest()
219 http_response->set_content_type("text/html"); in HandleDefaultRequest()
220 return std::move(http_response); in HandleDefaultRequest()
/external/autotest/frontend/afe/
Dviews.py66 http_response = HttpResponse(content)
69 http_response[header] = value
70 return http_response
/external/rust/crates/grpcio-sys/grpc/test/core/security/
Dcredentials_test.cc259 static grpc_httpcli_response http_response(int status, const char* body) { in http_response() function
318 http_response(200, valid_oauth2_json_response); in test_oauth2_token_fetcher_creds_parsing_ok()
335 http_response(401, valid_oauth2_json_response); in test_oauth2_token_fetcher_creds_parsing_bad_http_status()
346 grpc_httpcli_response response = http_response(200, ""); in test_oauth2_token_fetcher_creds_parsing_empty_http_body()
358 http_response(200, in test_oauth2_token_fetcher_creds_parsing_invalid_json()
372 grpc_httpcli_response response = http_response(200, in test_oauth2_token_fetcher_creds_parsing_missing_token()
387 http_response(200, in test_oauth2_token_fetcher_creds_parsing_missing_token_type()
403 http_response(200, in test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime()
687 *response = http_response(200, valid_oauth2_json_response); in compute_engine_httpcli_get_success_override()
696 *response = http_response(403, "Not Authorized."); in compute_engine_httpcli_get_failure_override()
[all …]
Djwt_verifier_test.cc334 static grpc_httpcli_response http_response(int status, char* body) { in http_response() function
354 *response = http_response(200, good_google_email_keys()); in httpcli_get_google_keys_for_email()
401 *response = http_response(200, gpr_strdup(good_jwk_set)); in httpcli_get_custom_keys_for_email()
435 *response = http_response(200, gpr_strdup(good_jwk_set)); in httpcli_get_jwk_set()
447 *response = http_response(200, gpr_strdup(good_openid_config)); in httpcli_get_openid_config()
491 *response = http_response(200, gpr_strdup("{\"bad\": \"stuff\"}")); in httpcli_get_bad_json()
/external/grpc-grpc/test/core/security/
Dcredentials_test.cc147 static grpc_httpcli_response http_response(int status, const char* body) { in http_response() function
206 http_response(200, valid_oauth2_json_response); in test_oauth2_token_fetcher_creds_parsing_ok()
223 http_response(401, valid_oauth2_json_response); in test_oauth2_token_fetcher_creds_parsing_bad_http_status()
234 grpc_httpcli_response response = http_response(200, ""); in test_oauth2_token_fetcher_creds_parsing_empty_http_body()
246 http_response(200, in test_oauth2_token_fetcher_creds_parsing_invalid_json()
260 grpc_httpcli_response response = http_response(200, in test_oauth2_token_fetcher_creds_parsing_missing_token()
275 http_response(200, in test_oauth2_token_fetcher_creds_parsing_missing_token_type()
291 http_response(200, in test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime()
550 *response = http_response(200, valid_oauth2_json_response); in compute_engine_httpcli_get_success_override()
559 *response = http_response(403, "Not Authorized."); in compute_engine_httpcli_get_failure_override()
[all …]
Djwt_verifier_test.cc311 static grpc_httpcli_response http_response(int status, char* body) { in http_response() function
331 *response = http_response(200, good_google_email_keys()); in httpcli_get_google_keys_for_email()
377 *response = http_response(200, gpr_strdup(good_jwk_set)); in httpcli_get_custom_keys_for_email()
410 *response = http_response(200, gpr_strdup(good_jwk_set)); in httpcli_get_jwk_set()
422 *response = http_response(200, gpr_strdup(good_openid_config)); in httpcli_get_openid_config()
465 *response = http_response(200, gpr_strdup("{\"bad\": \"stuff\"}")); in httpcli_get_bad_json()
/external/cronet/net/third_party/quiche/src/quiche/blind_sign_auth/
Dblind_sign_auth_test.cc186 BlindSignHttpResponse http_response( in TEST_F() local
188 callback(http_response); in TEST_F()
281 BlindSignHttpResponse http_response( in TEST_F() local
283 callback(http_response); in TEST_F()
/external/libwebsockets/lib/roles/ws/
Dclient-ws.c259 if (wsi->http.ah->http_response == 401) { in lws_client_ws_upgrade()
261 wsi->http.ah->http_response); in lws_client_ws_upgrade()
266 if (wsi->http.ah->http_response != 101) { in lws_client_ws_upgrade()
268 wsi->http.ah->http_response); in lws_client_ws_upgrade()
/external/google-breakpad/src/common/windows/
Dhttp_upload.cc322 int http_response = wcstol(http_status, NULL, 10); in SendRequestInner() local
324 *response_code = http_response; in SendRequestInner()
327 bool result = (http_response == 200); in SendRequestInner()
/external/cronet/net/cert/
Dcert_verify_proc_builtin_unittest.cc75 auto http_response = std::make_unique<test_server::BasicHttpResponse>(); in ServeResponse() local
77 http_response->set_code(status_code); in ServeResponse()
78 http_response->set_content_type(content_type); in ServeResponse()
79 http_response->set_content(content); in ServeResponse()
80 return http_response; in ServeResponse()
/external/python/python-api-core/tests/unit/
Dtest_exceptions.py288 http_response = make_response(
293 exception = exceptions.from_http_response(http_response)
/external/libwebsockets/lib/roles/http/client/
Dclient-http.c575 if (wsi->http.ah && wsi->http.ah->http_response) in lws_http_client_http_response()
576 return wsi->http.ah->http_response; in lws_http_client_http_response()
635 ah->http_response = 0; in lws_client_interpret_server_handshake()
696 ah->http_response = (unsigned int)n; in lws_client_interpret_server_handshake()

12