【文件属性】:
文件名称:httpc::satellite_antenna:向HTTP服务器发出请求
文件大小:9KB
文件格式:ZIP
更新时间:2021-02-27 07:50:36
erlang http-client gleam Rust
httpc
绑定到Erlang的内置HTTP客户端httpc 。
import gleam / httpc
import gleam / http.{Get}
import gleam / should
pub fn main () {
// Prepare a HTTP request record
let req = http. default_req ()
| > http. set_method (Get)
| > http. set_host ( "test-api.service.hmrc.gov.uk" )
| > http. set_path ( "/hello/world" )
| > http. prepend_req_header ( "accept" , "application/vnd.hmrc.1.0+json" )
【文件预览】:
httpc-main
----.gitignore(145B)
----README.md(1KB)
----CHANGELOG.md(276B)
----.github()
--------workflows()
----test()
--------gleam_httpc_test.gleam(2KB)
----LICENSE(11KB)
----.gitattributes(31B)
----src()
--------gleam_httpc.app.src(334B)
--------gleam()
----rebar.lock(545B)
----rebar.config(248B)
----gleam.toml(21B)