Skip to content

trustpub: Change PUT /api/v1/trusted_publishing/tokens endpoint to POST #11392

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jun 19, 2025

PUT should be used for updates, not for resource creation. The conventional HTTP method for resource creation in REST APIs is POST. This also matches what PyPI is using.

The endpoint is already used by the experimental GitHub Action, but since we control that and are aware of the change we can easily fix it on that side :)

Related:

@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-backend ⚙️ labels Jun 19, 2025
…`POST`

`PUT` should be used for updates, not for resource creation. The conventional HTTP method for resource creation in REST APIs is `POST`. This also matches what PyPI is using.
@Turbo87 Turbo87 force-pushed the trustpub-exchange-method branch from 72dfbe2 to b7847e5 Compare June 19, 2025 14:01
@Turbo87 Turbo87 merged commit f26e157 into rust-lang:main Jun 19, 2025
10 checks passed
@Turbo87 Turbo87 deleted the trustpub-exchange-method branch June 19, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant