# POST request for load\_data

**URL:** <https://zola.discourse.group/t/post-request-for-load-data/715>\
**Category:** Uncategorized\
**Created:** [December 17, 2020, 5:10pm UTC](https://zola.discourse.group/t/post-request-for-load-data/715 "2020-12-17T17:10:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HugoTrentesaux](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/hugotrentesaux/32/105_2.png) [@HugoTrentesaux](https://zola.discourse.group/u/HugoTrentesaux)\
**Post date:** [December 17, 2020, 5:10pm UTC](https://zola.discourse.group/t/post-request-for-load-data/715/1 "2020-12-17T17:10:59Z")

</div>

[load\_data](https://www.getzola.org/documentation/templates/overview/#load-data) allows to make a GET request for example to a json API.

Is there a way to use it for a POST request for example to a GraphQL API?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 17, 2020, 8:15pm UTC](https://zola.discourse.group/t/post-request-for-load-data/715/2 "2020-12-17T20:15:53Z")

</div>

Not right now but that shouldn’t be hard to add it to the function. On the other hand, writing a graphql query in a template doesn’t sound fun

---

<div class="post-metadata">

**Author:** ![Marco](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/marco/32/478_2.png) [@Marco](https://zola.discourse.group/u/Marco)\
**Post date:** [March 9, 2021, 10:31am UTC](https://zola.discourse.group/t/post-request-for-load-data/715/3 "2021-03-09T10:31:11Z")

</div>

Hi,

i have a usecase for post requests as well and have some time this week.

I was thinking something along these lines:

```
{% set postdata = load_data(url="https://postman-echo.com/post", 
										format="json", 
										method="POST", 
										body="{test:'teststr'}", 
										content-type="application/json")%}

```

so that would be 3 new parameters.  
when method=POST is set an optional content-type and body will be added the the POST request.

Is this something you would want added to zola, @keats?  
I’d be willing to give it a go.
