# Matching POST request BODY

**URL:** <https://community.postman.com/t/matching-post-request-body/5649>\
**Category:** Help Hub\
**Tags:** post, mock-server\
**Created:** [May 29, 2019, 7:25am UTC](https://community.postman.com/t/matching-post-request-body/5649 "2019-05-29T07:25:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alanlobeslab](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@alanlobeslab](https://community.postman.com/u/alanlobeslab)\
**Post date:** [May 29, 2019, 7:25am UTC](https://community.postman.com/t/matching-post-request-body/5649/1 "2019-05-29T07:25:20Z")

</div>

Hello,

I am using mock-server to test post and get requests. I have created various examples for a get request that match with the query parameter and the correct response is received.

However, when using POST requests, can responses be sent based on content in the request body?

Thanks.

---

<div class="post-metadata">

**Author:** ![deepak.pathania1](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@deepak.pathania1](https://community.postman.com/u/deepak.pathania1)\
**Post date:** [May 29, 2019, 10:51am UTC](https://community.postman.com/t/matching-post-request-body/5649/2 "2019-05-29T10:51:52Z")

</div>

I don’t think mock servers support matching by request body yet, you can open a feature request in the issue tracker on github for the same.

Meanwhile, you could use custom headers like `x-mock-response-name` and `x-mock-response-id` for matching. It is explained in a little more detail in [this](https://community.postman.com/t/mock-server-responses-matching-request-query-string-params/343/2) answer.

Feel free to ping here in case you need some help in setting this up and I or someone else from the community would be happy to help. 🙂

---

<div class="post-metadata">

**Author:** ![alanlobeslab](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@alanlobeslab](https://community.postman.com/u/alanlobeslab)\
**Post date:** [May 30, 2019, 10:53am UTC](https://community.postman.com/t/matching-post-request-body/5649/3 "2019-05-30T10:53:03Z")

</div>

Thank you. I will use this approach.

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [June 3, 2019, 12:42am UTC](https://community.postman.com/t/matching-post-request-body/5649/4 "2019-06-03T00:42:11Z")

</div>

Please note that this approach is not really optimal, as it forces you to modify your request to include additional headers.

It would be great if the Postman team could invest some time to improve the matching algorithm to make it work for such scenarios as well.

---

<div class="post-metadata">

**Author:** ![pw812.job](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@pw812.job](https://community.postman.com/u/pw812.job)\
**Post date:** [March 19, 2021, 9:34am UTC](https://community.postman.com/t/matching-post-request-body/5649/5 "2021-03-19T09:34:53Z")

</div>

The feature would be really good! Adding an extra header just to work with the mock server is not an optimal solution.

---

<div class="post-metadata">

**Author:** ![ivorobioff](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@ivorobioff](https://community.postman.com/u/ivorobioff)\
**Post date:** [May 27, 2021, 12:29pm UTC](https://community.postman.com/t/matching-post-request-body/5649/6 "2021-05-27T12:29:07Z")

</div>

Agree. This feature is very needed

---

<div class="post-metadata">

**Author:** ![hannah.neil](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/hannah.neil/32/4477_2.png) [@hannah.neil](https://community.postman.com/u/hannah.neil)\
**Post date:** [May 27, 2021, 7:15pm UTC](https://community.postman.com/t/matching-post-request-body/5649/7 "2021-05-27T19:15:55Z")

</div>

Hi @ivorobioff and everyone reading this. Thanks for requesting features that will improve your experience as a Postman user. We are not using this Community forum for feature requests, however, so please note the following guidelines:

> **Have an idea for a new Postman feature or enhancement?** Submit your feature request [on GitHub](https://github.com/postmanlabs/postman-app-support). 🚀
> 
> Check out the [Postman Roadmap for Developers](https://github.com/postmanlabs/postman-app-support/projects/45?fullscreen=true) for a sneak peek at what’s coming up.
> 
> Search for an existing feature request to see if there’s one similar to yours. If you see your suggestion already requested, feel free to add a “+1” reaction and we will keep a note of it. This helps Postman keep track of all the features requested and respond when the feature is released into production.

I’m going to close this thread now, so if you have specific questions or advice on how to work around your current problem, please start a new thread. Thanks 🙂

---

<div class="post-metadata">

**Author:** ![hannah.neil](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/hannah.neil/32/4477_2.png) [@hannah.neil](https://community.postman.com/u/hannah.neil)\
**Post date:** [May 27, 2021, 7:16pm UTC](https://community.postman.com/t/matching-post-request-body/5649/8 "2021-05-27T19:16:02Z")

</div>

Closed on May 27, 2021, 7:16pm UTC


