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

POST mocks resulting in 404 #957

Closed
Squixx opened this issue Nov 9, 2022 · 2 comments
Closed

POST mocks resulting in 404 #957

Squixx opened this issue Nov 9, 2022 · 2 comments

Comments

@Squixx
Copy link

Squixx commented Nov 9, 2022

Somhow POST mocks result in a 404 when having content-type application/json, while postman calls work..

{
  "name": "user-userProperties-POST",
  "isArray": true,
  "expression": "api/user/userProperties",
  "request": {
    "url": "/user/userProperties",
    "method": "POST"
  },
  "responses": {
    "default": {
      "default": true,
      "file": "../POST_200.preset.json",
      "headers": { "Content-type": "application/json" }
    },
    "internal-server-error": {
      "status": 500
    }
  }
}

post works without content type, but when adding content type the request just times out

@Squixx
Copy link
Author

Squixx commented Nov 9, 2022

nevermind.

Seems content matching matches more explicit after v3.0.0

Be sure to EXACTLY match your body / headers (or ignore them totally)

@FrancescoBorzi
Copy link

I consider this a regression, see #1067

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

2 participants