Skip to content

Incorrect Content-Type Header for postMapping. #39

Description

@jordanrilassi

Hello,

By default the .postMapping method creates a stub using an URLRequest with a default Content-Type "application/x-www-form-urlencoded", which is incorrect. The value of this header should be "application/json" since the body is actually JSON.

I am having an issue where a security equipment between my client code and the mock server blocks all stub creations because of the incorrect value of this HTTP Header.

I tested that the correct value "application/json" works as intended.
Do you think it would be possible to use the correct value for all stub creations please ?

Thank you for your help.
(If you need, I can provide a PR)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions