# Node-RED setting httpNodeMiddleware question

**URL:** <https://discourse.nodered.org/t/node-red-setting-httpnodemiddleware-question/64668>\
**Category:** General\
**Created:** [4 July 2022 09:37 UTC](https://discourse.nodered.org/t/node-red-setting-httpnodemiddleware-question/64668 "2022-07-04T09:37:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeungChunChiu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/leungchunchiu/32/63211_2.png) [@LeungChunChiu](https://discourse.nodered.org/u/LeungChunChiu)\
**Post date:** [4 July 2022 09:37 UTC](https://discourse.nodered.org/t/node-red-setting-httpnodemiddleware-question/64668/1 "2022-07-04T09:37:07Z")

</div>

![1656927113201](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/b/eb728da4dbdb6061b68975889aea99d10b9af879.png)

When I have questions when using the httpNodeMiddleware , I want to reject the request and return the response when the conditions are met, how should i write! thinks!!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 July 2022 10:50 UTC](https://discourse.nodered.org/t/node-red-setting-httpnodemiddleware-question/64668/2 "2022-07-04T10:50:54Z")

</div>

You need to do some reading about ExpressJS which is what underlies this.

In general, if you want to reject a request, you need to provide a status code and response.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 September 2022 10:51 UTC](https://discourse.nodered.org/t/node-red-setting-httpnodemiddleware-question/64668/3 "2022-09-02T10:51:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
