# How does the hooks API work on http in node?

**URL:** <https://discourse.nodered.org/t/how-does-the-hooks-api-work-on-http-in-node/44790>\
**Category:** Core Development\
**Created:** [27 April 2021 05:55 UTC](https://discourse.nodered.org/t/how-does-the-hooks-api-work-on-http-in-node/44790 "2021-04-27T05:55:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mannharleen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mannharleen/32/25594_2.png) [@mannharleen](https://discourse.nodered.org/u/mannharleen)\
**Post date:** [27 April 2021 05:55 UTC](https://discourse.nodered.org/t/how-does-the-hooks-api-work-on-http-in-node/44790/1 "2021-04-27T05:55:23Z")

</div>

The hooks API is truly amazing. At this point I am trying to build a tracing/data lineage capability using the hooks API. Unfortunately, I cant seem to find how the hook will work with nodes like HTTP In.  
The xxxReceive hooks dont seem to be working on it.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [27 April 2021 07:43 UTC](https://discourse.nodered.org/t/how-does-the-hooks-api-work-on-http-in-node/44790/2 "2021-04-27T07:43:12Z")

</div>

Hi @mannharleen

The `onReceived` hook is triggered as part of the routing of messages between nodes.

In the case of the HTTP In node, it doesn't receive messages from an 'up stream' node - it generates messages in response to an HTTP request arriving. So you won't get the `onReceive` hook triggered for that.

---

<div class="post-metadata">

**Author:** ![mannharleen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mannharleen/32/25594_2.png) [@mannharleen](https://discourse.nodered.org/u/mannharleen)\
**Post date:** [9 May 2021 09:41 UTC](https://discourse.nodered.org/t/how-does-the-hooks-api-work-on-http-in-node/44790/3 "2021-05-09T09:41:36Z")

</div>

I understand. So, it should work with the `onSend` hook then

---

<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:** [8 July 2021 09:42 UTC](https://discourse.nodered.org/t/how-does-the-hooks-api-work-on-http-in-node/44790/4 "2021-07-08T09:42:20Z")

</div>

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