Skip to content

Refactor: Change IndexData and IndexDataDump to POST#535

Merged
jrhoads merged 1 commit into
devfrom
url-methods
Jun 4, 2026
Merged

Refactor: Change IndexData and IndexDataDump to POST#535
jrhoads merged 1 commit into
devfrom
url-methods

Conversation

@jrhoads

@jrhoads jrhoads commented Jun 4, 2026

Copy link
Copy Markdown
Member

Purpose

This PR changes the HTTP method for the IndexData and IndexDataDump views from GET to POST. This change is made to align with the best practices for endpoints that perform write operations or trigger significant actions.

Approach

The GET method is generally used for retrieving data, while POST is more appropriate for operations that may alter server state or submit data. By changing these endpoints to POST, we ensure that their usage is consistent with their intended functionality.

Key Modifications

  • Changed the HTTP method for IndexData view from GET to POST.
  • Changed the HTTP method for IndexDataDump view from GET to POST.
  • Updated unit tests to reflect the change in HTTP methods for both views.
  • Added new tests for IndexData and IndexDataDump to verify authentication header handling when using POST.

Important Technical Details

  • The change to POST for IndexData and IndexDataDump improves the semantic correctness of the API.
  • The added tests ensure that the authentication mechanism correctly handles incoming POST requests with TOKEN and ROUTE_USER headers.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

@jrhoads jrhoads merged commit 7b1d873 into dev Jun 4, 2026
2 checks passed
@jrhoads jrhoads deleted the url-methods branch June 4, 2026 18:00
jrhoads added a commit that referenced this pull request Jun 4, 2026
[To Staging] Change IndexData and IndexDataDump to POST (#535)
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.

1 participant