Skip to content

get endpoint idea #378

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

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

get endpoint idea #378

wants to merge 3 commits into from

Conversation

jvanasco
Copy link
Contributor

@jvanasco jvanasco commented Mar 11, 2025

fixes #377

adds /get endpoint, which requires the same params as /update BUT does not write the txt value and returns the existing txt value

Originally: I would rather have not required a subdomain for POST, but this leverages the existing auth AND works as a decent dry-run . someone more familiar with Go could write a much better PR. this is just a proof of concept.

Now: Requiring the subdomain makes sense, and I refactored the code.

@Tragen
Copy link

Tragen commented Mar 11, 2025

Shouldn't this be api.GET instead of api.POST as with api.GET("/health", healthCheck)?
POST is for changing data.
Sure it will work but it looks strange to me.

@jvanasco
Copy link
Contributor Author

This is an authenticated call, so should be sent in POST. /health is not authenticated.

@coveralls
Copy link

coveralls commented Mar 11, 2025

Coverage Status

coverage: 73.291% (+0.02%) from 73.276%
when pulling 8594bf4 on jvanasco:feature-check
into b7a0a8a on joohoi:master.

@jvanasco
Copy link
Contributor Author

Added tests and docs.

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.

Feature Request - "get" endpoint
3 participants