Skip to content

POST requests with no body fail, but empty bodies succeed #2002

@mikemahoney218-usgs

Description

@mikemahoney218-usgs

Description
This request fails:

curl --location --request POST 'https://demo.pygeoapi.io/master/collections/obs/items'

This request succeeds:

curl --location --request POST 'https://demo.pygeoapi.io/master/collections/obs/items' --data-raw '{}'

My understanding is that a POST request shouldn't necessarily need a body (there's some discussion around https://stackoverflow.com/questions/4191593/is-it-considered-bad-practice-to-perform-http-post-without-entity-body ). Is this behavior expected?

Steps to Reproduce

curl --location --request POST 'https://demo.pygeoapi.io/master/collections/obs/items'

Expected behavior
I'd expect these requests to work and return identical result sets.

Environment

  • pygeoapi version: 0.20.dev0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssue marked stale by stale-bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions