Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https client #19

Open
ilmanzo opened this issue May 31, 2020 · 4 comments
Open

https client #19

ilmanzo opened this issue May 31, 2020 · 4 comments

Comments

@ilmanzo
Copy link

ilmanzo commented May 31, 2020

sample program, client requesting an https resource :

import hunt.http;
import std.stdio;

void main()
{
    auto client = new HttpClient();
    auto request = new RequestBuilder().url("https://www.google.com").build();
    auto response = client.newCall(request).execute();
    if (response !is null)
    {
        writeln(response.getBody().asString());
    }
}

gives error

2020-May-31 09:36:05.8637941 | 7341 | warning | RealCall.execute | No any response in 15 secs | ../../../.dub/packages/hunt-http-0.6.0/hunt-http/source/hunt/http/client/RealCall.d:199
hunt.Exceptions.TimeoutException@../../../.dub/packages/hunt-http-0.6.0/hunt-http/source/hunt/http/client/RealCall.d(205)
----------------
../../../.dub/packages/hunt-http-0.6.0/hunt-http/source/hunt/http/client/RealCall.d:205 hunt.http.client.HttpClientResponse.HttpClientResponse hunt.http.client.RealCall.RealCall.execute() [0x55b790b27769]
source/app.d:9 _Dmain [0x55b790b19d3a]
Program exited with code 1

$ cat dub.selections.json
{
        "fileVersion": 1,
        "versions": {
                "hunt": "1.6.1",
                "hunt-extra": "1.0.0",
                "hunt-http": "0.6.0",
                "hunt-net": "0.5.0",
                "hunt-openssl": "1.0.1"
        }
}

@Heromyth
Copy link
Contributor

Heromyth commented Jun 1, 2020

It seems more tests are needed. By now, it may fail when visiting some websites with HTTPS .

@Heromyth Heromyth closed this as completed Jun 1, 2020
@Heromyth Heromyth reopened this Jun 1, 2020
@kamyar1979
Copy link

I have the same problem. Please help

@kamyar1979
Copy link

It seems more tests are needed. By now, it may fail when visiting some HTTS websites.

I beg please fix this! I can not find the problem!

@bagomot
Copy link

bagomot commented Jul 19, 2022

I have the same problem. For example, a request for a url returns a 400 error: The plain HTTP request was sent to HTTPS port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants