Skip to content

Commit e118227

Browse files
committed
uefi: http: improve doc
1 parent bdc806f commit e118227

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

uefi/src/proto/network/http.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,23 @@ impl HttpBinding {
117117
}
118118
}
119119

120-
/// HTTP Response data
120+
/// Representation of the underlying UEFI HTTP response.
121+
///
122+
/// Helper type for [`HttpHelper`].
121123
#[derive(Debug)]
122124
pub struct HttpHelperResponse {
123125
/// HTTP Status
124126
pub status: HttpStatusCode,
125127
/// HTTP Response Headers
126128
pub headers: Vec<(String, String)>,
127-
/// HTTP Body
129+
/// Partial or entire HTTP body, depending on context.
128130
pub body: Vec<u8>,
129131
}
130132

131-
/// HTTP Helper, makes using the HTTP protocol more convenient.
133+
/// HTTP Helper, makes using the [HTTP] [`Protocol`] more convenient.
134+
///
135+
/// [HTTP]: Http
136+
/// [`Protocol`]: uefi::proto::Protocol
132137
#[derive(Debug)]
133138
pub struct HttpHelper {
134139
child_handle: Handle,
@@ -271,7 +276,12 @@ impl HttpHelper {
271276
Ok(())
272277
}
273278

274-
/// Receive the start of the http response, the headers and (parts of) the body.
279+
/// Receive the start of the http response, the headers and (parts of) the
280+
/// body.
281+
///
282+
/// Depending on the HTTP response, its length, its encoding, and its
283+
/// transmission method (chunked or not), users may have to call
284+
/// [`Self::response_more`] afterward.
275285
pub fn response_first(&mut self, expect_body: bool) -> uefi::Result<HttpHelperResponse> {
276286
let mut rx_rsp = HttpResponseData {
277287
status_code: HttpStatusCode::STATUS_UNSUPPORTED,

0 commit comments

Comments
 (0)