title: SIM7000E - HTTP POST with AT Commands
body: <p>I am using a SIM7000E module to which I send AT commands over UART. I configure the module sending the following set of commands:</p>
  
  <pre><code>AT+CPIN=1234
  AT+CREG=1
  AT+CGATT=1
  AT+CIPSTATUS
  AT+CIPMUX=0
  AT+CSTT="vpn","user","password"
  AT+CIICR
  AT+CIFSR
  AT+CIPSTART="TCP","xxx.xxx.xxx.xxx","80"
  </code></pre>
  
  <p>Everything works fine until this point. </p>
  
  <p>However, I want to register a variable using POST method :</p>
  
  <pre><code>AT+CIPSEND  
  &gt; POST /register.node#1 HTTP/1.1
  Host: xxx.xxx.xxx.xxx
  Content-Type: application/x-www-form-urlencoded
  cache-control: no-cache
  Postman-Token: be423989-072e-4262-857a-f985157ec720
  (Empty line)
  (Ctrl+z)
  </code></pre>
  
  <p>The command in C is:</p>
  
  <pre><code>"POST /register.node#1 HTTP/1.1\r\nHost: xxx.xxx.xxx.xxx\r\nContent-Type: application/x-www-form-urlencoded\r\ncache-control: no-cache\r\nPostman-Token: be423989-072e-4262-857a-f985157ec720\r\n\r\n"
  </code></pre>
  
  <p>And the response I get is:</p>
  
  <pre><code>SEND OK
  HTTP/1.1 400 Bad Request
  Date: Wed, 21 Nov 2018 21:54:00 GMT
  Server: Apache/2.4.25 (Debian)
  Content-Length: 295
  Connection: close
  Content-Type: text/html; charset=iso-8859-1
  
  &lt;!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"&gt;
   &lt;html&gt;
          &lt;head&gt;
                &lt;title&gt;400 Bad Request&lt;/title&gt;
          &lt;/head&gt;
          &lt;body&gt;                                                                                                    
                &lt;h1&gt;Bad Request&lt;/h1&gt;
  
                &lt;p&gt;Your browser sent a request that this server could not understand.&lt;br/&gt;
                &lt;/p&gt;
                &lt;hr&gt;
  
                &lt;address&gt;Apache/2.4.25 (Debian) Server at ::1 Port 80&lt;/address&gt;
  
          &lt;/body&gt;
  &lt;/html&gt;
  
  CLOSED
  </code></pre>
  
  <p>I do not know what is wrong with the code. I downloaded Postman app, made the same POST and  it works as expected:</p>
  
  <p><a href="https://i.stack.imgur.com/jEATo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jEATo.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/s2QNx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s2QNx.png" alt="enter image description here"></a></p>