Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/roc_host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ pub extern "C" fn roc_fx_send_request(
})
}

async fn async_send_request(request: hyper::Request<String>) -> roc_http::ResponseToAndFromHost {
async fn async_send_request(request: hyper::Request<hyper::Body>) -> roc_http::ResponseToAndFromHost {
use hyper::Client;
use hyper_rustls::HttpsConnectorBuilder;

Expand All @@ -569,7 +569,7 @@ async fn async_send_request(request: hyper::Request<String>) -> roc_http::Respon
.enable_http1()
.build();

let client: Client<_, String> = Client::builder().build(https);
let client: Client<_, hyper::Body> = Client::builder().build(https);
let res = client.request(request).await;

match res {
Expand Down
4 changes: 2 additions & 2 deletions crates/roc_http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl RequestToAndFromHost {
}
}

pub fn to_hyper_request(&self) -> Result<hyper::Request<String>, hyper::http::Error> {
pub fn to_hyper_request(&self) -> Result<hyper::Request<hyper::Body>, hyper::http::Error> {
let method: hyper::Method = self.as_hyper_method();
let mut req_builder = hyper::Request::builder()
.method(method)
Expand All @@ -153,7 +153,7 @@ impl RequestToAndFromHost {
req_builder = req_builder.header("Content-Type", "text/plain");
}

let bytes = String::from_utf8(self.body.as_slice().to_vec()).unwrap();
let bytes = hyper::Body::from(self.body.as_slice().to_vec());

req_builder.body(bytes)
}
Expand Down