# Newbie. Trouble getting through the online guide

**URL:** <https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874>\
**Category:** Elasticsearch\
**Created:** [January 3, 2019, 10:04pm UTC](https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874 "2019-01-03T22:04:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmclaugh](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@bmclaugh](https://discuss.elastic.co/u/bmclaugh)\
**Post date:** [January 3, 2019, 10:04pm UTC](https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874/1 "2019-01-03T22:04:44Z")

</div>

Installed v 7.0.0-alpha2 on Windows 10. Using the getting-started guide at [https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-explore.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-explore.html) I am able to get the cluster health. I am able to list the indices. I am able to create an index. But when I try to put some data into the index (using the COPY AS CURL link to copy the curl command to the clipboard and then paste into my cmd shell), I get the following:

```
C:\Users\bmclaugh>curl -X PUT "localhost:9200/customer/_doc/1?pretty" -H 'Content-Type: application/json' -d'
{
  "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",
  "status" : 406
}
curl: (6) Could not resolve host: application

C:\Users\bmclaugh>{
'{' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\bmclaugh> "name": "John Doe"
'"name":' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\bmclaugh>}
'}' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\bmclaugh>'
''' is not recognized as an internal or external command,
operable program or batch file.
```

That looked like a cr/lf issue, so I reformatted the curl command to reside on a single line. I get the following:

```
C:\Users\bmclaugh>curl -X PUT "localhost:9200/customer/_doc/1?pretty" -H 'Content-Type: application/json' -d '{"name": "John Doe"}'
{
  "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",
  "status" : 406
}
curl: (6) Could not resolve host: application
curl: (3) [globbing] unmatched close brace/bracket in column 9
```

What am I doing wrong here? Again, the first attempt above is a copy/paste from the getting-started-query-document.html online.

Thanks,

Brian

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 3, 2019, 10:18pm UTC](https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874/2 "2019-01-03T22:18:23Z")

</div>

Curl on windows is challenging.  
I'd recommend starting Kibana and running examples from the Kibana dev console instead.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [January 4, 2019, 2:24am UTC](https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874/3 "2019-01-04T02:24:20Z")

</div>

You may want to use [Windows Subsystem for Linux (WSL) on Windows](https://docs.microsoft.com/en-us/windows/wsl/install-win10), to have a Linux Bash shell experience on Windows. With WSL, the curl commands should work exactly as in the docs.

As an alternative, if you would prefer to use PowerShell, I put together [a small PowerShell Script module](https://gist.github.com/russcam/7fbdbaa37e3dcb3fd3ee0aa54af3708c) that you may want to check out for issuing curl-like requests to Elasticsearch.

You can [install into a PowerShell session](https://gist.github.com/russcam/7fbdbaa37e3dcb3fd3ee0aa54af3708c#gistcomment-2363363) (may need to change your [Execution Policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6) to do this), then can run the commands

For example, the first command in your question

```auto
es "http://localhost:9200/customer/_doc/1?pretty" -X PUT -d @'
{
  "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",
  "status" : 406
}
'@

```

---

<div class="post-metadata">

**Author:** ![bmclaugh](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@bmclaugh](https://discuss.elastic.co/u/bmclaugh)\
**Post date:** [January 30, 2019, 9:18pm UTC](https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874/4 "2019-01-30T21:18:40Z")

</div>

Thank you guys. I quit trying to use it from the windows command prompt. I installed it on Linux, and using curl from the bash shell worked just fine.

Thanks,

Brian

---

<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:** [February 27, 2019, 9:18pm UTC](https://discuss.elastic.co/t/newbie-trouble-getting-through-the-online-guide/162874/5 "2019-02-27T21:18:42Z")

</div>

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