http-rs / http-rs/surf

method HEAD error

Open
#218 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
1.5k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

I tried to use http HEAD method and it would hand
```rust
async_std::task::block_on(async move {
let res = surf::head("http://example.com").await.expect("surf");
println!("{:?}", res);
});
```
And if i replace http with https, it would give me exception
```
thread 'test_header' panicked at 'surf: ResponseBodyError(None): unknown error', http/src/lib.rs:84:19
```
If I replace `head` with `get`, all things goes well.

```toml
[dependencies]
surf = "2.0.0-alpha.4"
async-std = "1.6.3"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.