# Compose XMLHttp requests with node

**URL:** https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495
**Category:** General
**Created:** [1 September 2021 09:59 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495 "2021-09-01T09:59:48Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![muharremsari](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/muharremsari/32/7996_2.png) [@muharremsari](https://discourse.nodered.org/u/muharremsari)
#### Post date: [1 September 2021 09:59 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/1 "2021-09-01T09:59:48Z")

</div>

When I click view source in iexplorer, it starts such a query and I can see the value in its payload.

How do i that query with node-red

 ![XMLHttp_req](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/6/d6d62747935653f00cae0e84e2381f9a5fb3fa8f.png)

Regards

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [1 September 2021 10:24 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/2 "2021-09-01T10:24:30Z")

</div>

set the same headers in the request.

[https://cookbook.nodered.org/http/set-request-header](https://cookbook.nodered.org/http/set-request-header)

---

<div class="post-metadata">

### Author: ![muharremsari](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/muharremsari/32/7996_2.png) [@muharremsari](https://discourse.nodered.org/u/muharremsari)
#### Post date: [2 September 2021 05:50 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/3 "2021-09-02T05:50:51Z")

</div>

Thks for express answer

I was established device with your support

By the way;

When i click the parameter it is requested from the value [https://x.x.x.x/data/bulk/](https://x.x.x.x/data/bulk/) path. When I normally call to this path with iexplorer, it downloads a hollow bulk.json file. How can I make this request

 ![XMLHttp_req_json_data](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/0993ec8b48c02942ae34589d7f17ac602af0ec54.png)

Regards

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [2 September 2021 07:05 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/4 "2021-09-02T07:05:11Z")

</div>

> [@muharremsari](#):
>
> How can I make this request

Use the post method & look at what value is sent in the request. Ps, using chrome it is much clearer what is happening.

---

<div class="post-metadata">

### Author: ![muharremsari](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/muharremsari/32/7996_2.png) [@muharremsari](https://discourse.nodered.org/u/muharremsari)
#### Post date: [4 September 2021 12:40 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/5 "2021-09-04T12:40:58Z")

</div>

Thank you Steve

For your suggestion chrome was very helpful. But I am getting a fetch error in the function node. I think will be add the necessary require to my settings.js file for this issue.But which line in settings.js

 ![fetch_is_not_defined](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74dca3db37ef96bc0ad86d0ef7a0052b087b8cd1.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [4 September 2021 13:00 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/6 "2021-09-04T13:00:06Z")

</div>

First, fetch is a client side thing & function nodes run server-side (in nodejs)

Second, the http request node does what fetch does.

The cookbook entry I linked to shows you how to do a request with headers.

---

<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 October 2021 08:41 UTC](https://discourse.nodered.org/t/compose-xmlhttp-requests-with-node/50495/7 "2021-10-02T08:41:27Z")

</div>

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