Skip to content

Commit dbc0983

Browse files
committed
sdk: export RedirectPolicy
1 parent 4040473 commit dbc0983

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/sdk/src/http.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ pub use super::fetch::fetch;
1616
pub type RequestError = super::http_service::land::http::http_outgoing::RequestError;
1717
/// `RequestOptions` is options for fetching request, including timeout and redirect policy.
1818
pub type RequestOptions = super::http_service::land::http::http_outgoing::RequestOptions;
19+
/// `RedirectPolicy` is redirect policy for fetching request.
20+
pub type RedirectPolicy = super::http_service::land::http::http_types::RedirectPolicy;
1921

2022
/// `error_response` is a helper function to build a response with status code and message.
2123
pub fn error_response(status: http::StatusCode, message: String) -> Response {

crates/worker/src/hostcall/http_body.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl Host for HttpContext {
2020
return Ok(Ok((vec![], true))); // end of stream
2121
}
2222
let chunk = chunk.unwrap().unwrap();
23-
debug!("read chunk: {}", chunk.len());
23+
debug!("read chunk: {}, handle: {}", chunk.len(), handle);
2424
Ok(Ok((chunk.to_vec(), false)))
2525
}
2626

@@ -84,4 +84,4 @@ impl Host for HttpContext {
8484
debug!("new body stream: {}", body_handle);
8585
Ok(Ok(body_handle))
8686
}
87-
}
87+
}

0 commit comments

Comments
 (0)