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

Inconsistency between how fields can be specified for GET and form-data POST requests #1089

Open
theosanderson opened this issue Feb 27, 2025 · 0 comments

Comments

@theosanderson
Copy link

For GET requests you can make a request:

https://lapis-main.loculus.org/cchf/sample/details?fields=accession,accessionVersion

However the corresponding POST request, which is what the Swagger UI generates, doesn't work:

curl -X 'POST' \
  'https://lapis-main.loculus.org/cchf/sample/details' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'fields=accession,accessionVersion'`

But one can work around this with:

curl -X 'POST' \
  'https://lapis-main.loculus.org/cchf/sample/details' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'fields=accession&fields=accessionVersion'
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

No branches or pull requests

1 participant