From 195833b301256601bd7db75a436c72e71b705371 Mon Sep 17 00:00:00 2001 From: Weizheng Liu <60593974+weizhliu@users.noreply.github.com> Date: Mon, 12 Feb 2024 18:51:36 +0800 Subject: [PATCH] Update HTTP Service Example - update import type syntax - use bytes_builder over bit_builder --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 076e3a7..e0f5629 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,14 @@ Types and functions for HTTP clients and servers! ```gleam import gleam/http/elli -import gleam/http/response.{Response} -import gleam/http/request.{Request} -import gleam/bit_builder.{BitBuilder} +import gleam/http/response.{type Response} +import gleam/http/request.{type Request} +import gleam/bytes_builder.{type BytesBuilder} // Define a HTTP service // -pub fn my_service(request: Request(t)) -> Response(BitBuilder) { - let body = bit_builder.from_string("Hello, world!") +pub fn my_service(_request: Request(t)) -> Response(BytesBuilder) { + let body = bytes_builder.from_string("Hello, world!") response.new(200) |> response.prepend_header("made-with", "Gleam")