/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/response/ |
H A D | mod.rs | 39 body: T, field 59 pub fn body(&self) -> &T { in body() method 60 &self.body in body() 65 &mut self.body in body_mut() 75 Self { part, body } in from_raw_parts() 125 body: result.1, in ut_response_version() 144 body: result.1, in ut_response_status_code() 162 body: result.1, in ut_response_headers() 188 body: result.1, in ut_response_body() 206 body: result.1, in ut_response_body_mut() [all …]
|
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/async_impl/downloader/ |
H A D | builder.rs | 68 pub fn body(self, body: Response) -> DownloaderBuilder<WantsOperator> { in body() method 70 state: WantsOperator { body }, in body() 83 body: Response, field 127 body: self.state.body, in operator() 150 body: self.state.body, in console() 160 body: Response, field 218 body: self.state.body, in build()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/downloader/ |
H A D | builder.rs | 66 pub fn body(self, body: Response) -> DownloaderBuilder<WantsOperator> { in body() method 68 state: WantsOperator { body }, in body() 81 body: Response, field 125 body: self.state.body, in operator() 147 body: self.state.body, in console() 157 body: Response, field 220 body: self.state.body, in build()
|
/ohos5.0/base/security/device_security_level/services/dslm/ |
H A D | dslm_msg_utils.c | 43 DslmJsonHandle body = DslmCreateJson(NULL); in GenerateSecInfoResponseJson() local 44 if (body == NULL) { in GenerateSecInfoResponseJson() 50 DslmAddFieldJsonToJson(head, FIELD_PAYLOAD, body); in GenerateSecInfoResponseJson() 68 body = NULL; // no need to free body in GenerateSecInfoResponseJson() 71 if (body != NULL) { in GenerateSecInfoResponseJson() 72 DslmDestroyJson(body); in GenerateSecInfoResponseJson() 86 DslmJsonHandle body = DslmCreateJson(NULL); in GenerateSecInfoRequestJson() local 87 if (body == NULL) { in GenerateSecInfoRequestJson() 111 body = NULL; // no need to free body in GenerateSecInfoRequestJson() 114 if (body != NULL) { in GenerateSecInfoRequestJson() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/ |
H A D | text.rs | 21 use crate::body::origin::FromAsyncBody; 453 use crate::body::text::{TextBody, TextBodyDecoder}; 495 use crate::body::sync_impl::Body; in ut_text_body_from_bytes_syn_data() 498 let mut body = TextBody::from_bytes(bytes); in ut_text_body_from_bytes_syn_data() localVariable 501 let size = body.data(&mut buf).expect("First read failed."); in ut_text_body_from_bytes_syn_data() 531 use crate::body::async_impl::Body; in text_body_from_bytes_asyn_data() 534 let mut body = TextBody::from_bytes(bytes); in text_body_from_bytes_asyn_data() localVariable 557 use crate::body::sync_impl::Body; in ut_text_body_from_reader_syn_data() 560 let mut body = TextBody::from_reader(reader); in ut_text_body_from_reader_syn_data() localVariable 594 use crate::body::async_impl::Body; in text_body_from_async_reader_asyn_data() [all …]
|
H A D | mod.rs | 352 TrailerFuture { body: self } in trailer() 364 body: &'a mut T, field 388 body: &'a mut T, field 523 pub(crate) body: T, 528 Self { body } in new() 536 &self.body in deref() 542 &mut self.body in deref_mut() 549 use crate::body::EmptyBody; 561 let mut body = EmptyBody::new(); in ut_syn_body_mut_syn_body_data() localVariable 562 let body_mut = &mut body; in ut_syn_body_mut_syn_body_data() [all …]
|
H A D | empty.rs | 18 use crate::body::{async_impl, sync_impl}; 105 use crate::body::empty::EmptyBody; 124 use crate::body::sync_impl::Body; in ut_empty_body_sync_impl_data() 126 let mut body = EmptyBody::new(); in ut_empty_body_sync_impl_data() localVariable 128 assert_eq!(body.data(&mut buf), Ok(0)); in ut_empty_body_sync_impl_data() 148 use crate::body::async_impl::Body; in empty_body_async_impl_data() 150 let mut body = EmptyBody::new(); in empty_body_async_impl_data() localVariable 152 assert_eq!(body.data(&mut buf).await, Ok(0)); in empty_body_async_impl_data()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/request/ |
H A D | mod.rs | 81 body: T, field 254 body, in new() 408 pub fn body(&self) -> &T { in body() method 409 &self.body in body() 423 &mut self.body in body_mut() 436 (self.part, self.body) in into_parts() 451 Request { part, body } in from_raw_parts() 636 pub fn body<T>(self, body: T) -> Result<Request<T>, HttpError> { in body() method 639 body, in body() 722 .body(()) in ut_request_builder_build() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/docs/ |
H A D | user_guide.md | 96 .body("".as_bytes()); // 设置 body 106 - `body`: 设置一般 body 内容 107 - `multipart`: 设置 multipart 格式 body 内容 122 .body("HelloWorld"); 132 用户可以在 body 的基础上,使用 `Uploader` 对上传逻辑进行控制: 185 但是 body 部分需要用户根据自身需求在后续逻辑中读取。 187 #### 读取响应 body 189 得到 `Response` 后,可以对响应的 body 信息读取。 191 用户可以通过调用 `Response::body_mut()`,获取到 body,再使用 `Body::data()` 自行读取 body 内容。 212 `Downloader` 提供一个直接将 body 输出到控制台的简单方式: [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/encode/ |
H A D | part.rs | 19 use crate::body::async_impl::Body; 21 use crate::body::mime::{EncodeHeaders, MixFrom, PartStatus}; 22 use crate::body::{async_impl, sync_impl, MimePart}; 63 body: Option<MixFrom<'a>>, field 84 let body = (!part.body.is_empty()).then_some(part.body); in from_part() localVariable 91 body, in from_part() 105 if self.body.is_some() { in check_next() 158 if let Some(body) = &mut self.body { in body_sync_encode() 159 let size = sync_impl::Body::data(body, dst)?; in body_sync_encode() 223 match self.body { in poll_mime_body() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/common/ |
H A D | part.rs | 18 use crate::body::mime::{MixFrom, CR, LF}; 64 pub(crate) body: MixFrom<'a>, 71 body: MixFrom::new(), in new() 106 self.body.set_owned(data); in body_from_owned() 110 self.body.set_bytes(data); in body_from_bytes() 117 self.body.set_reader(data); in body_from_reader() 124 self.body.set_async_reader(data); in body_from_async_reader() 183 pub fn body(&self) -> Option<&Vec<u8>> { in body() method 184 match &self.body { in body() 192 match &mut self.body { in body_mut() [all …]
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/conn/ |
H A D | http1.rs | 18 use ylong_http::body::async_impl::Body; 19 use ylong_http::body::{ChunkBody, TextBody}; 116 let body = request.body_mut(); in encode_various_body() localVariable 120 let body = ChunkBody::from_async_reader(body); in encode_various_body() localVariable 121 encode_body(conn, body, buf).await?; in encode_various_body() 124 let body = TextBody::from_async_reader(body); in encode_various_body() localVariable 125 encode_body(conn, body, buf).await?; in encode_various_body() 128 let body = TextBody::from_async_reader(body); in encode_various_body() localVariable 129 encode_body(conn, body, buf).await?; in encode_various_body() 225 mut body: T, in encode_body() [all …]
|
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/service/src/obex/ |
H A D | obex_mp_server.cpp | 64 auto body = req.GetItemBody(); in HandlePutRequest() local 65 if (body != nullptr) { in HandlePutRequest() 67 … session.GetReceivedObject()->AppendBody(body->GetBytes().get(), body->GetHeaderDataSize()); in HandlePutRequest() 109 auto body = req.GetItemEndBody(); in HandlePutFinalRequest() local 110 if (body != nullptr) { in HandlePutFinalRequest() 112 … session.GetReceivedObject()->AppendBody(body->GetBytes().get(), body->GetHeaderDataSize()); in HandlePutFinalRequest() 119 auto body = req.GetItemEndBody(); in HandlePutFinalRequest() local 120 if (body != nullptr) { in HandlePutFinalRequest() 122 writer->Write(body->GetBytes().get(), body->GetHeaderDataSize()); in HandlePutFinalRequest()
|
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/async_impl/uploader/ |
H A D | multipart.rs | 169 if let Some(body) = part.body.take() { in build_status() 170 states.push(body); in build_status() 251 body: Option<MultiPartState>, field 270 body: None, in new() 349 pub fn body<T: AsRef<[u8]>>(mut self, body: T) -> Self { in body() method 350 let body = body.as_ref().to_vec(); in body() localVariable 351 self.length = Some(body.len() as u64); in body() 352 self.body = Some(MultiPartState::bytes(body)); in body() 370 pub fn stream<T: AsyncRead + Send + Sync + 'static>(mut self, body: T) -> Self { in stream() 371 self.body = Some(MultiPartState::stream(Box::pin(body))); in stream()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/ |
H A D | simple.rs | 169 if let Some(body) = part.body.take() { in build_status() 170 states.push(body); in build_status() 281 body: Option<MultiPartState>, field 300 body: None, in new() 379 pub fn body<T: AsRef<[u8]>>(mut self, body: T) -> Self { in body() method 380 let body = body.as_ref().to_vec(); in body() localVariable 382 self.body = Some(MultiPartState::bytes(body)); in body() 390 self.body = Some(MultiPartState::stream(Box::new(body))); in stream() 652 .body("1234"); in ut_part_set() 693 .body("1234"), in ut_multipart_set() [all …]
|
/ohos5.0/drivers/hdf_core/framework/tools/hdf_dev_eco_tool/command_line/ |
H A D | hdf_command_line_server.py | 35 body = bytearray(content, 'utf-8') 37 header = bytearray('{},{}\n'.format(msg_type, len(body)), 'utf-8') 39 header = bytearray('{},{},{}\n'.format(msg_type, len(body), err_code), 41 bytes_packet = bytearray().join([header, body]) 54 def decode_body(body): argument 58 args = arg_parser.parse_args(body.strip().split(' ')) 87 body = str(body_bytes, encoding='utf-8') 88 return decode_body(body)
|
/ohos5.0/foundation/communication/netstack/interfaces/innerkits/rust/ylong_http_client/src/reqwest_impl/ |
H A D | request.rs | 38 pub(crate) body: T, 174 pub fn body<T: Into<reqwest::Body>>(self, body: T) -> Result<Request<T>, HttpClientError> { in body() method 177 body, in body() 199 pub fn multipart<T>(self, body: T) -> Result<Request<T>, HttpClientError> in multipart() 203 let value = format!("multipart/form-data; boundary={}", body.as_ref().boundary()); in multipart() 212 if let Some(size) = body.as_ref().total_bytes() { in multipart() 220 Ok(Request { inner, body }) in multipart()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/tests/ |
H A D | sdv_http_body.rs | 16 use ylong_http::body::{async_impl, ChunkBody, ChunkBodyDecoder, EmptyBody}; 58 use ylong_http::body::sync_impl::Body as SyncBody; in sdv_chunk_body_encode() 61 let mut body = ChunkBody::from_reader(content.as_slice()); in sdv_chunk_body_encode() localVariable 67 size = body.data(buf.as_mut_slice()).unwrap(); in sdv_chunk_body_encode() 135 use ylong_http::body::sync_impl::Body as SyncBody; in sdv_chunk_body_encode_trailer_0() 211 use ylong_http::body::async_impl::Body as AsyncBody; in sdv_empty_body_async_impl_data() 214 let mut body = EmptyBody; in sdv_empty_body_async_impl_data() localVariable 216 assert_eq!(body.data(&mut buf).await, Ok(0)); in sdv_empty_body_async_impl_data()
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/ |
H A D | request.rs | 22 use ylong_http::body::async_impl::ReusableReader; 23 use ylong_http::body::MultiPartBase; 204 pub fn body(self, body: Body) -> Result<Request, HttpClientError> { in body() method 206 match body.inner { in body() 230 .body(body) in body() 439 let request = builder.body(Body::empty()); in ut_client_request_builder_default() 445 .body(Body::empty()); in ut_client_request_builder_default() 459 use ylong_http::body::{MultiPart, Part}; in ut_client_request_builder_body() 473 let mut request = RequestBuilder::default().body(Body::multipart(mp)).unwrap(); in ut_client_request_builder_body()
|
/ohos5.0/docs/zh-cn/application-dev/web/ |
H A D | web-scheme-handler.md | 674 <body> 683 </body> 699 <body> 709 const body = document.body; 727 <body> 748 <body> 787 <body> 801 const body = document.body; 812 <body> 837 <body> [all …]
|
H A D | web-cross-origin.md | 87 <body> 89 </body> 95 const body = document.body; 98 body.appendChild(element); 185 <body> 190 </body> 197 const body = document.body; 200 body.appendChild(element);
|
H A D | web-page-loading-with-web-components.md | 112 <body> 114 </body> 124 <body> 126 </body> 205 <body> 207 </body> 233 "<html><body bgcolor=\"white\">Source:<pre>source</pre></body></html>", 259 …htmlStr: string = "data:text/html, <html><body bgcolor=\"white\">Source:<pre>source</pre></body></…
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/decode/ |
H A D | part.rs | 16 use crate::body::mime::common::{get_crlf_contain, trim_back_lwsp_if_end_with_lf, trim_front_lwsp}; 17 use crate::body::mime::decode::BoundaryTag; 18 use crate::body::mime::{DecodeHeaders, MimePart, PartStatus}; 19 use crate::body::TokenStatus; 128 let body = match self.part.body() { in body_decode() localVariable 132 let line = &body[self.src_idx..]; in body_decode() 152 self.src_idx = body.len(); in body_decode() 172 use crate::body::mime::{MimePart, MimePartDecoder}; 173 use crate::body::TokenStatus;
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/tests/common/ |
H A D | mod.rs | 236 .body(ylong_http::body::TextBody::from_bytes($req_body.as_bytes())) 260 .body(ylong_http_client::async_impl::Body::slice($req_body.as_bytes())) 313 let body = hyper::body::to_bytes(request.into_body()).await localVariable 315 assert_eq!($req_body.as_bytes(), body, "Assert request body failed"); 321 .body($resp_body.into()) 376 let body = hyper::body::to_bytes(request.into_body()).await localVariable 378 assert_eq!($req_body.as_bytes(), body, "Assert request body failed"); 384 .body($resp_body.into())
|
/ohos5.0/commonlibrary/rust/ylong_http/ylong_http_client/src/util/h2/ |
H A D | data_ref.rs | 25 body: Option<RequestArc>, field 31 body: Some(request), in new() 36 self.body = None; in clear() 44 let request = if let Some(ref mut request) = self.body { in poll_read()
|