Skip to content

Commit 9fa61f8

Browse files
committed
v3.7.1
1 parent 74977e0 commit 9fa61f8

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v3.7.1 - 2024-11-19
4+
5+
- Fixed warnings on `gleam_stdlib` v0.42.0.
6+
37
## v3.7.0 - 2024-09-12
48

59
- The `gleam/http/request` module gains the `remove_cookie` function.

gleam.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "gleam_http"
2-
version = "3.7.0"
2+
version = "3.7.1"
33
licences = ["Apache-2.0"]
44
description = "Types and functions for Gleam HTTP clients and servers"
55
gleam = ">= 1.0.0"

src/gleam/http/request.gleam

+3-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import gleam/list
44
import gleam/option.{type Option}
55
import gleam/result
66
import gleam/string
7-
import gleam/string_builder
87
import gleam/uri.{type Uri, Uri}
98

109
/// A HTTP request.
@@ -179,18 +178,13 @@ pub fn set_query(
179178
query: List(#(String, String)),
180179
) -> Request(body) {
181180
let pair = fn(t: #(String, String)) {
182-
string_builder.from_strings([
183-
uri.percent_encode(t.0),
184-
"=",
185-
uri.percent_encode(t.1),
186-
])
181+
uri.percent_encode(t.0) <> "=" <> uri.percent_encode(t.1)
187182
}
188183
let query =
189184
query
190185
|> list.map(pair)
191-
|> list.intersperse(string_builder.from_string("&"))
192-
|> string_builder.concat
193-
|> string_builder.to_string
186+
|> list.intersperse("&")
187+
|> string.concat
194188
|> option.Some
195189
Request(..req, query: query)
196190
}

0 commit comments

Comments
 (0)