title: How to do http get with netcat?
body: <p>I am trying to use <code>netcat</code> to submit an HTTP GET request. But it gives me the 505 error. Does anybody know what is wrong with my use of <code>netcat</code>? Thanks.</p>
  
  <pre><code>$ cat main.sh 
  #!/usr/bin/env bash
  
  netcat -v httpbin.org 80 &lt;&lt;EOF
  GET /get HTTP/1.1
  
  EOF
  
  $ ./main.sh
  httpbin.org [23.23.171.5] 80 (http) open
  HTTP/1.1 505 HTTP Version Not Supported
  Connection: close
  Server: Cowboy
  Date: Fri, 09 Feb 2018 00:26:37 GMT
  Content-Length: 0
  </code></pre>