Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add HTTP Method as a Parameter for APIs that support POST#302

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
s3714110 wants to merge3 commits into4n4nd:master
base:master
Choose a base branch
Loading
froms3714110:feature/add_http_method_param

Conversation

@s3714110
Copy link

@s3714110s3714110 commentedJul 4, 2025
edited
Loading

I'm adding extramethod parameter for PrometheusConnect class (default is GET), so that users can toggle to use POST for Prometheus APIs that support it, such as/query,/query_range and/labels, as some prefer POST due to it being able to handle larger and more complex queries.

Other APIs, such as/label/{1}/values,/targets,/targets/metadata and/metadata, will still only use GET method and are not affected by themethod parameter. I also switch to userequest() method for the session object across all requests to make it consistent.

I used the official Prometheus documentation as the main reference:https://prometheus.io/docs/prometheus/latest/querying/api/

@4n4nd
Copy link
Owner

@s3714110 would it be possible to add some test cases for the POST method?

@s3714110
Copy link
Author

@s3714110 would it be possible to add some test cases for the POST method?

Hi@4n4nd , I just added a couple of simple tests, all passed on my end. Please review, thanks

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@yashvardhannanavatiyashvardhannanavatiyashvardhannanavati approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@s3714110@4n4nd@yashvardhannanavati

[8]ページ先頭

©2009-2025 Movatter.jp