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

refactor: ⬆️ Update ureq #2699

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

refactor: ⬆️ Update ureq #2699

wants to merge 2 commits into from

Conversation

zmerp
Copy link
Member

@zmerp zmerp commented Feb 12, 2025

No description provided.

.headers()
.get("Content-Length")
.map(|l| l.to_str().ok())
.flatten()
Copy link
Collaborator

Choose a reason for hiding this comment

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

clippy

Comment on lines +197 to +200
// todo: this should be changed to a GET request, requires removing body
request_agent
.get(&uri)
.set("X-ALVR", "true")
.post(&uri)
.header("X-ALVR", "true")
Copy link
Collaborator

Choose a reason for hiding this comment

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

huh? I guess post will also work, but wdym by removing body for the get? If anything I think it should be kept as a get in the scope of this pr, so you gotta explain a bit further why that's not possible

Copy link
Member Author

Choose a reason for hiding this comment

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

Using the new ureq 3.0 api, when using get() you can't later call send_json. I think they split the builder struct to disable unidiomatic usages

Copy link
Member Author

Choose a reason for hiding this comment

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

In general GET requests shouldn't have a body and all the info they send to the server required for the request should be put in the URL itself. this means we should remove the DashboardRequest structure and make separate URLs (as it was before)

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