From f10f8fb270e48db0f4647024d74438a34f9e94b3 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 2 Nov 2023 11:16:00 +0000 Subject: [PATCH] Simplify example --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c2363c5..9390e05 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,8 @@ import gleeunit/should pub fn main() { // Prepare a HTTP request record - let request = request.new() - |> request.set_method(Get) - |> request.set_host("test-api.service.hmrc.gov.uk") - |> request.set_path("/hello/world") - |> request.prepend_header("accept", "application/vnd.hmrc.1.0+json") + let assert Ok(request) = + request.to("https://test-api.service.hmrc.gov.uk/hello/world") // Send the HTTP request to the server try resp = httpc.send(req)