Home
last modified time | relevance | path

Searched refs:headers (Results 1 - 25 of 42) sorted by relevance

12

/base/request/request/frameworks/js/napi/src/legacy/
H A Ddownload_task.cpp128 bool DownloadTask::SetOption(CURL *handle, curl_slist *&headers) in SetOption() argument
150 headers = curl_slist_append(headers, head.c_str()); in SetOption()
152 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers); in SetOption()
196 curl_slist *headers{}; in DoDownload()
197 std::shared_ptr<CURL> handle(curl_easy_init(), [headers](CURL *handle) { in DoDownload()
198 if (headers) { in DoDownload()
199 curl_slist_free_all(headers); in DoDownload()
210 if (!SetOption(handle.get(), headers)) { in DoDownload()
/base/request/request/services/include/
H A Dc_task_config.h61 CStringWrapper headers; member
87 std::string headers; member
/base/request/request/frameworks/js/napi/src/upload/
H A Dcurl_adp.cpp396 std::string headers = std::accumulate(fData->responseHead.begin(), fData->responseHead.end(), std::string("")); in HeaderCallback() local
397 UPLOAD_HILOGD(UPLOAD_MODULE_FRAMEWORK, "report head len: %{public}zu, content: %{public}s", headers.length(), in HeaderCallback()
398 headers.c_str()); in HeaderCallback()
399 NotifyAPI5(fData, headers); in HeaderCallback()
423 void CUrlAdp::NotifyAPI5(FileData *fData, std::string &headers) in NotifyAPI5() argument
428 resData.headers = headers; in NotifyAPI5()
434 fData->adp->config_->ffail(headers, fData->httpCode); in NotifyAPI5()
/base/request/request/frameworks/cj/ffi/src/
H A Dcj_request_common.cpp175 out.extras.headers = static_cast<CHashStrPair *>(malloc(sizeof(CHashStrPair) * in.extras.size())); in Convert2CProgress()
176 if (out.extras.headers == nullptr) { in Convert2CProgress()
182 CHashStrPair *elem = &out.extras.headers[index++]; in Convert2CProgress()
303 out.headers = static_cast<CHashStrPair *>(malloc(sizeof(CHashStrPair) * size)); in Convert2CHashStrArr()
304 if (out.headers == nullptr) { in Convert2CHashStrArr()
310 out.headers[i].key = MallocCString(it.first); in Convert2CHashStrArr()
311 out.headers[i].value = MallocCString(it.second); in Convert2CHashStrArr()
H A Dcj_request_impl.cpp98 const CHashStrPair *cheader = &cheaders->headers[i]; in ConvertCArr2Map()
128 out.headers = ConvertCArr2Map(&config->headers); in Convert2Config()
253 out.headers = Convert2CHashStrArr(in.headers); in Convert2CConfig()
/base/request/request/services/src/task/
H A Dconfig.rs108 pub(crate) headers: HashMap<String, String>,
151 pub(crate) headers: String,
225 headers: hashmap_to_string(&self.headers),
258 headers: Default::default(), in default()
456 parcel.write(&(self.headers.len() as u32))?; in serialize()
457 for header in self.headers.iter() { in serialize()
H A Dffi.rs39 pub(crate) headers: CStringWrapper,
271 headers: CStringWrapper::from(&set.headers),
318 headers: string_to_hashmap(&mut c_struct.headers.to_string()),
H A Drequest_task.rs310 for (key, value) in self.conf.headers.iter() {
409 let content_type = response.headers().get("content-type");
416 let content_length = response.headers().get("content-length");
475 let headers = response.headers().clone();
478 .send_response(tid, version, status_code, status_message, headers)
494 for (k, v) in r.headers() {
570 Action::Download => match self.conf.headers.get("Content-Type") {
/base/request/request/frameworks/cj/ffi/include/
H A Dcj_request_ffi.h36 CHashStrPair *headers; member
88 CHashStrArr headers; member
/base/request/request/services/src/service/client/
H A Dmod.rs127 headers: Headers,
129 let event = ClientEvent::SendResponse(tid, version, status_code, reason, headers);
195 ClientEvent::SendResponse(tid, version, status_code, reason, headers) => {
196 self.handle_send_response(tid, version, status_code, reason, headers)
226 headers: Headers,
251 for (k, v) in headers {
H A Dmanager.rs90 ClientEvent::SendResponse(tid, version, status_code, reason, headers) => {
98 headers,
/base/request/request/frameworks/js/napi/include/legacy/
H A Ddownload_task.h54 bool SetOption(CURL *handle, curl_slist *&headers);
/base/request/request/test/unittest/cpp_test/fwkTest/src/
H A Dresponse_message_receiver_test.cpp287 std::map<std::string, std::vector<std::string>> headers; in HWTEST_F() local
292 EXPECT_EQ(ResponseMessageReceiver::ResponseHeaderFromParcel(headers, parcel, size), 0); in HWTEST_F()
293 header = headers["header"]; in HWTEST_F()
465 string headers = "header:aaa,bbb,ccc\n"; in HWTEST_F() local
477 EXPECT_EQ(memcpy_s(except + pos, static_cast<size_t>(ARRAY_LEN - pos), headers.c_str(), headers.size() + 1), 0); in HWTEST_F()
478 pos += (headers.size() + 1); in HWTEST_F()
498 auto header = response->headers["header"]; in HWTEST_F()
/base/request/request/frameworks/js/napi/include/
H A Djs_common.h101 std::string headers; member
149 std::map<std::string, std::string> headers; member
311 std::map<std::string, std::vector<std::string>> headers; member
/base/request/request/services/src/service/command/
H A Dconstruct.rs174 let mut headers: HashMap<String, String> = HashMap::new(); variables
178 headers.insert(key, value);
208 headers,
/base/account/os_account/frameworks/appaccount/cj/include/
H A Dappaccount_defination.h29 CHashStrStrPair *headers; member
/base/request/request/frameworks/js/napi/include/upload/
H A Dupload_config.h41 std::string headers; member
H A Dcurl_adp.h48 static void NotifyAPI5(FileData *fData, std::string &headers);
/base/request/request/frameworks/js/napi/src/
H A Dnapi_utils.cpp189 napi_value headers = nullptr; in Convert2JSHeadersAndBody() local
190 napi_create_object(env, &headers); in Convert2JSHeadersAndBody()
192 napi_set_named_property(env, headers, cInt.first.c_str(), Convert2JSValue(env, cInt.second)); in Convert2JSHeadersAndBody()
210 napi_set_named_property(env, object, "headers", headers); in Convert2JSHeadersAndBody()
214 napi_set_named_property(env, headers, "body", body); in Convert2JSHeadersAndBody()
215 return headers; in Convert2JSHeadersAndBody()
446 napi_set_named_property(env, value, "headers", Convert2JSValue(env, config.headers)); in Convert2JSValueConfig()
478 napi_set_named_property(env, value, "headers", Convert2JSHeader in Convert2JSValue()
482 Convert2JSHeaders(napi_env env, const std::map<std::string, std::vector<std::string>> &headers) Convert2JSHeaders() argument
[all...]
/base/web/webview/interfaces/kits/napi/webviewcontroller/
H A Dnative_media_player_impl.cpp408 napi_value* value, const std::map<std::string, std::string>& headers) in ConstructHeaders()
412 for (const auto& header : headers) { in ConstructHeaders()
463 napi_value headers = nullptr; in ConstructMediaInfo() local
464 ConstructHeaders(&headers, mediaInfo->GetHeaders()); in ConstructMediaInfo()
465 NAPI_CALL_RETURN_VOID(env_, napi_set_named_property(env_, *value, "headers", headers)); in ConstructMediaInfo()
407 ConstructHeaders( napi_value* value, const std::map<std::string, std::string>& headers) ConstructHeaders() argument
H A Dnative_media_player_impl.h114 void ConstructHeaders(napi_value* value, const std::map<std::string, std::string>& headers);
/base/request/request/frameworks/native/include/
H A Dresponse_message_receiver.h53 std::map<std::string, std::vector<std::string>> &headers, char *&parcel, int32_t &size);
/base/request/request/frameworks/native/src/
H A Dresponse_message_receiver.cpp157 std::map<std::string, std::vector<std::string>> &headers, char *&parcel, int32_t &size) in ResponseHeaderFromParcel()
171 headers[key].push_back(value); in ResponseHeaderFromParcel()
279 ResponseHeaderFromParcel(response->headers, parcel, size); in ResponseFromParcel()
156 ResponseHeaderFromParcel( std::map<std::string, std::vector<std::string>> &headers, char *&parcel, int32_t &size) ResponseHeaderFromParcel() argument
/base/request/request/test/fuzztest/downloaduploadmanager_fuzzer/
H A Ddownloaduploadmanager_fuzzer.cpp557 std::map<std::string, std::vector<std::string>> headers; in ResponseMessageFuzzTestResponseHeaderFromParcel() local
561 ResponseMessageReceiver::ResponseHeaderFromParcel(headers, parcel, testSize); in ResponseMessageFuzzTestResponseHeaderFromParcel()
698 std::string headers = "header:aaa,bbb,ccc\n"; in ResponseMessageFuzzTestResponseFromParcel() local
721 ret = memcpy_s(except + pos, static_cast<size_t>(ARRAY_LEN - pos), headers.c_str(), headers.size() + 1); in ResponseMessageFuzzTestResponseFromParcel()
725 pos += (headers.size() + 1); in ResponseMessageFuzzTestResponseFromParcel()
/base/web/webview/interfaces/kits/cj/src/
H A Dwebview_ffi.cpp131 int32_t FfiOHOSWebviewCtlLoadUrlWithHeaders(int64_t id, char *url, ArrWebHeader headers) in FfiOHOSWebviewCtlLoadUrlWithHeaders() argument
139 uint32_t arrayLength = static_cast<uint32_t>(headers.size); in FfiOHOSWebviewCtlLoadUrlWithHeaders()
141 std::string key = headers.head[i].headerKey; in FfiOHOSWebviewCtlLoadUrlWithHeaders()
142 std::string value = headers.head[i].headerValue; in FfiOHOSWebviewCtlLoadUrlWithHeaders()
188 int32_t FfiOHOSWebviewCtlPreFetchPageWithHeaders(int64_t id, char *url, ArrWebHeader headers) in FfiOHOSWebviewCtlPreFetchPageWithHeaders() argument
205 uint32_t arrayLength = static_cast<uint32_t>(headers.size); in FfiOHOSWebviewCtlPreFetchPageWithHeaders()
207 std::string key = headers.head[i].headerKey; in FfiOHOSWebviewCtlPreFetchPageWithHeaders()
208 std::string value = headers.head[i].headerValue; in FfiOHOSWebviewCtlPreFetchPageWithHeaders()

Completed in 19 milliseconds

12