Skip to content

[http client]: support HTTPS #207

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

Closed
wants to merge 1 commit into from
Closed

Conversation

niklasad1
Copy link
Contributor

Closes #189, HTTPS is supported by surf which makes this quite simple to implement. The bad thing is that users can't disable it.

I found a faulty unwrap where we should return an error instead, which this PR fixes too but surf::Error doesn't implement std::errror::Error.Thus, I decided to switch to anyhow instead Box<dyn std::error::Error + Send + Sync>

@@ -167,4 +156,17 @@ mod tests {
let response = client.send_request(request).await.unwrap_err();
assert!(matches!(response, Error::RequestTooLarge));
}

#[tokio::test]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a little bit heavy for a test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove it but just to demonstrate that it works :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move it to the separate tests, it's more of integration test than unit test.

@niklasad1
Copy link
Contributor Author

Closing this as #204 is getting reverted.

@niklasad1 niklasad1 closed this Feb 12, 2021
@niklasad1 niklasad1 deleted the na-http-client-https-support branch February 12, 2021 09:52
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

Successfully merging this pull request may close these issues.

[http client]: HTTPS support
2 participants