Skip to content

Commit 72b62a7

Browse files
committed
Remove request function
1 parent 7bb1661 commit 72b62a7

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
`get_req_header`, `get_resp_header`, `prepend_req_header`, `seq_req_host`,
99
`set_req_path`, `prepend_resp_header`, `set_req_method`, `set_req_body`,
1010
`set_resp_body`, `map_resp_body`, `map_req_body` `try_map_resp_body`,
11-
`req_from_uri`, `default_req`, `request`, and `redirect`.
11+
`req_from_uri`, `default_req`, and `redirect`.
1212
- Created the `gleam/http/middleware` module with the `Middleware` type and
1313
the `prepend_resp_header`, `map_resp_body` type.
1414

src/gleam/http.gleam

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
////
66
//// This module does not implement a HTTP client or HTTP server, but it can be used as a base for them.
77

8+
// TODO: validate_req
89
// TODO: set_resp_header
910
// https://github.com/elixir-plug/plug/blob/dfebbebeb716c43c7dee4915a061bede06ec45f1/lib/plug/conn.ex#L776
1011
// TODO: set_req_header
@@ -362,14 +363,6 @@ pub fn redirect(uri: String) -> Response(String) {
362363
)
363364
}
364365

365-
pub fn request(method: Method, url: String) -> Result(Request(String), Nil) {
366-
try uri = uri.parse(url)
367-
try req = req_from_uri(uri)
368-
req
369-
|> set_req_method(method)
370-
|> Ok
371-
}
372-
373366
/// A request with commonly used default values. This request can be used as a
374367
/// an initial value and then update to create the desired request.
375368
///

0 commit comments

Comments
 (0)