-
Notifications
You must be signed in to change notification settings - Fork 532
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
updated rust codegen #788
updated rust codegen #788
Conversation
@Udhay-Adithya Kindly review this PR |
@animator I’ve reviewed the PR and tested it locally. Everything works as expected. However, I noticed that some methods in the current codegen are deprecated. For example:
It’d be good to update these to follow the latest standards and avoid future issues. |
this PR solves the errors mentioned in the issue but I'll check and update everything within rust codegen. |
That would be great. |
for json requests serde_json is needed.
|
fn main() -> Result<(), ureq::Error> {
let url = "https://api.apidash.dev"; use serde_json::json;
let payload = json!({
"name" : "udhay"
});
let response = ureq::post(url)
.send_json(payload)?;
println!("Response Status: {}", response.status());
println!("Response: {}", response.into_body().read_to_string()?);
Ok(())
} The changes you made are working fine. Just move the use statement |
@Udhay-Adithya confirm the latest commit and PR is ready to be merged. |
@animator Everything works as expected. This PR can be merged. |
Thanks @badnikhil & @Udhay-Adithya |
PR Description
This PR fixes a compatibility issue with ureq 3.x caused by the removal of the into_string() method.] The code generated currently uses response.into_string(), which leads to compilation errors when using ureq 3.x and above.
Updated it to into_body().read_to_string()
Related Issues
Checklist
main
branch before making this PRflutter upgrade
and verify)flutter test
) and all tests are passingAdded/updated tests?
We encourage you to add relevant test cases.
OS on which you have developed and tested the feature?