Skip to content

Bug: /add endpoint returns 200 instead of 201 for new calculations #2

Description

@ascerra

Description

The /add endpoint returns HTTP 200 for successful addition operations. Per REST conventions, creating a new calculation result should return 201 Created.

Steps to reproduce

curl -X POST http://localhost:5000/add -H "Content-Type: application/json" -d '{"a": 2, "b": 3}'
# Returns 200 OK with {"result": 5}

Expected behavior

Should return 201 Created with the result body.

Actual behavior

Returns 200 OK.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiAPI and HTTP endpoint issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions