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

Remove reqwest dependency #354

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Remove reqwest dependency #354

wants to merge 12 commits into from

Conversation

KendallWeihe
Copy link
Contributor

No description provided.

@KendallWeihe KendallWeihe marked this pull request as draft September 12, 2024 13:26
@KendallWeihe
Copy link
Contributor Author

Converting to a draft for the time being for further consideration

@KendallWeihe
Copy link
Contributor Author

I think we'll probably move forward with this, but @diehuxx wondering if you can give it a look. Windows test seems to be failing so I'm guessing something in our TLS or TCP (or something else?) is causing issues specifically on Windows, so I'll get to the bottom of that.

I may rework the http.rs module to be a slightly different design, but I wanted to spike in the ground a functional solution where all tests are passing (except apparently Windows?).

The major win here is to get us off of OpenSSL entirely. Also it reduces the byte code file size by ~10% which is not insignificant. We're unable to get out of ring showing up in our Cargo.lock file, but @finn-tbd just recently added CI jobs which will fail if it slips into the compiled result.

@diehuxx
Copy link
Contributor

diehuxx commented Sep 17, 2024

@KendallWeihe The failure is that we expect Web5Error::Network("failed to lookup address information") but instead we're getting Web5Error::Network("No such host is known"). All that differs is the text of the error message returned to us by TcpStream::Connect in http.rs.

I suspect that Windows rust implementation of TcpStream::connect returns one error message and Mac and Linux return another. In both cases, the error message conveys the same thing, i.e. This host isn't valid.

I'd be comfortable just updating the test to accept either error message. I added a commit doing this.

Ok(json_value)
}

pub fn get_bytes_as_http_response(url: &str) -> Result<HttpResponse> {
Copy link
Contributor

Choose a reason for hiding this comment

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

feel like we could just call this get and it would be less confusing. get_bytes_as_http_response sounds like i'm parsing the url as an http response

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.

2 participants