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

HTTP Client Standard Library #2

Closed
AlenVelocity opened this issue Mar 8, 2022 · 3 comments
Closed

HTTP Client Standard Library #2

AlenVelocity opened this issue Mar 8, 2022 · 3 comments
Labels
Core good first issue Good for newcomers

Comments

@AlenVelocity
Copy link
Member

Implement a standard library which provides an interface for fetching resources across networks similar to JavaScript's fetch API

@AlenVelocity AlenVelocity added Core good first issue Good for newcomers labels Mar 8, 2022
@OHNONOTAMOTH
Copy link

will this work?
`
use reqwest::blocking;

fn gethttp(i: String) -> Result<String, reqwest::Error> {
let h = reqwest::blocking::get()?.text();
return h;
}
`

@AlenVelocity
Copy link
Member Author

Yes, Something like this parsed with Object::x(y) as return value.

@AlenVelocity AlenVelocity changed the title HTTP Standard Library HTTP Client Standard Library Mar 12, 2022
@OHNONOTAMOTH
Copy link

OHNONOTAMOTH commented Mar 12, 2022

`fn webget(i: String) -> Object::String {
return gethttp(i);
}

fn gethttp(i: String) -> Result<String, reqwest::Error> {
let h = reqwest::blocking::get(i)?.text();
return h;
`}

will this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants