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
Can't create projects via API #1464
Comments
The test anitya instance is here https://stg.release-monitoring.org, you can do anything you want on it. Regarding the issue with the project creation, I need to check the endpoint code more closely. I don't see anything wrong in the code at first glance or with the request you are sending. It looks like a valid JSON to me, but the endpoint doesn't recognize the required fields. |
Zlopez
added a commit
to Zlopez/anitya
that referenced
this issue
Sep 19, 2022
When specifying the header as `application/json` in POST request the flask parser wasn't able to parse the request correctly and instead saw empty list and returned 400. This fix will check if the request is JSON request and if this is true it will look for the data in request.json instead of request.form. Fixes fedora-infra#1464 Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez
added a commit
to Zlopez/anitya
that referenced
this issue
Sep 19, 2022
When specifying the header as `application/json` in POST request the flask parser wasn't able to parse the request correctly and instead saw empty list and returned 400. This fix will check if the request is JSON request and if this is true it will look for the data in request.json instead of request.form. Fixes fedora-infra#1464 Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez
added a commit
to Zlopez/anitya
that referenced
this issue
Sep 19, 2022
When specifying the header as `application/json` in POST request the flask parser wasn't able to parse the request correctly and instead saw empty list and returned 400. This fix will check if the request is JSON request and if this is true it will look for the data in request.json instead of request.form. Fixes fedora-infra#1464 Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez
added a commit
to Zlopez/anitya
that referenced
this issue
Sep 19, 2022
When specifying the header as `application/json` in POST request the flask parser wasn't able to parse the request correctly and instead saw empty list and returned 400. This fix will check if the request is JSON request and if this is true it will look for the data in request.json instead of request.form. Fixes fedora-infra#1464 Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Zlopez
added a commit
that referenced
this issue
Sep 19, 2022
When specifying the header as `application/json` in POST request the flask parser wasn't able to parse the request correctly and instead saw empty list and returned 400. This fix will check if the request is JSON request and if this is true it will look for the data in request.json instead of request.form. Fixes #1464 Signed-off-by: Michal Konečný <mkonecny@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i try to create new projects via api but this does not seem to work.
i tried:
i tried with the example from https://release-monitoring.org/static/docs/api.html
which did not work either:
besides: is there any test-anitya, where i should/could test? i dont want to disturb production-systems.
The text was updated successfully, but these errors were encountered: