# HTTP POST with CSV

**URL:** <https://discuss.elastic.co/t/http-post-with-csv/228052>\
**Category:** Logstash\
**Created:** [April 15, 2020, 8:03am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052 "2020-04-15T08:03:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![karnamonkster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karnamonkster/32/67266_2.png) [@karnamonkster](https://discuss.elastic.co/u/karnamonkster)\
**Post date:** [April 15, 2020, 8:03am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052/1 "2020-04-15T08:03:37Z")

</div>

Hi ,

This is in connection with one of the issues [here](https://discuss.elastic.co/t/how-to-send-data-to-a-http-end-point-using-ls-output-plugin/58959)

I have a typical scenario where i am not able to find this thing working.  
I could see the message at the other end (tested with localhost running : nc -l -k port) but i dont get a file created at the location given under header attribute as "Filename"

Here is my output header part for reference.

```
url => "https://IP?FQDN"
http_method => "post"
content_type => "application/octet-stream"
format => "form"
headers => [
"User-Agent" => "Model/ewdsaasa/Hardware/R1D Serial/123455 Application/1.1.21.3/66:77:88:99:00:A4"
"Connection" => "close"
"Authorization" => "Basic Y3VjdWx1czpjdWN1bHVz"
"Filename" => "123455_valuereport_%{device-identification}_3111.csv"
 "Product-Name" => " "
"Host" => "IPorFQDN"
"Accept" => "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"
"Content-Length" => "597"
]
```

---

<div class="post-metadata">

**Author:** ![karnamonkster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karnamonkster/32/67266_2.png) [@karnamonkster](https://discuss.elastic.co/u/karnamonkster)\
**Post date:** [April 16, 2020, 4:34am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052/2 "2020-04-16T04:34:17Z")

</div>

How do i pass these headers successfully in the HTTP output along with the CSV

---

<div class="post-metadata">

**Author:** ![stcdarrell](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@stcdarrell](https://discuss.elastic.co/u/stcdarrell)\
**Post date:** [April 18, 2020, 2:40am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052/3 "2020-04-18T02:40:40Z")

</div>

have you tried curly brackets around your headers? i've seen it that way in a few examples:  
headers =\> {  
"User-Agent" =\> "Model/ewdsaasa/Hardware/R1D Serial/123455 Application/1.1.21.3/66:77:88:99:00:A4"  
"Connection" =\> "close"  
"Authorization" =\> "Basic Y3VjdWx1czpjdWN1bHVz"  
"Filename" =\> "123455\_valuereport\_%{device-identification}\_3111.csv"  
"Product-Name" =\> " "  
"Host" =\> "IPorFQDN"  
"Accept" =\> "text/html, image/gif, image/jpeg, \*; q=.2, _/_; q=.2"  
"Content-Length" =\> "597"  
}

---

<div class="post-metadata">

**Author:** ![karnamonkster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karnamonkster/32/67266_2.png) [@karnamonkster](https://discuss.elastic.co/u/karnamonkster)\
**Post date:** [April 19, 2020, 4:07am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052/4 "2020-04-19T04:07:57Z")

</div>

Hi @stcdarrell,

I did tried that, same behavior

---

<div class="post-metadata">

**Author:** ![karnamonkster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karnamonkster/32/67266_2.png) [@karnamonkster](https://discuss.elastic.co/u/karnamonkster)\
**Post date:** [April 23, 2020, 7:23am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052/5 "2020-04-23T07:23:37Z")

</div>

Any help on this?  
Is there any simpler way to simply push a CSV using logstash HTTP Output?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 21, 2020, 7:23am UTC](https://discuss.elastic.co/t/http-post-with-csv/228052/6 "2020-05-21T07:23:39Z")

</div>

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