title: Firebase AT Command HTTP POST
body: <p>I am trying to do a post with a GPRS module in Firebase Database. The AT commands to the modem are being sent by Arduino Uno.</p>
  
  <pre><code>GPRScommand("AT+CIPSEND", "&gt;", "yy", 10000, 1);
  delay(500);
  GPRSboard.print("POST /.json?auth=");
  GPRSboard.print(FIREBASE_AUTH);
  GPRSboard.print(" HTTP/1.1");
  GPRSboard.print("\r\n");
  GPRSboard.print("Host: ");
  GPRSboard.print("XXXXXXXXXXXXXXX-461a8.firebaseio.com");
  GPRSboard.print("\r\n");
  GPRSboard.print("Content-Type: ");
  GPRSboard.print("application/json");
  GPRSboard.print("\r\n");
  GPRSboard.print("Content-Length: 16");
  GPRSboard.print("\r\n");   
  GPRSboard.print("Cache-Control: ");
  GPRSboard.print("no-cache");
  GPRSboard.print("\r\n");
  GPRSboard.print("\r\n");
  GPRSboard.print("{\"param1\":\"7\"}");
  GPRScommand(end_c, "HTTP/1.1", "yy", 30000, 1); 
  </code></pre>
  
  <p>It returns me:</p>
  
  <pre><code>+CIPRCV:384,HTTP/1.1 400 Bad Request 
  </code></pre>
  
  <p>I have tried using Postman. When I write the data I want to publish in the "Body TAB" of postman it works. I write in JSON Format:</p>
  
  <pre><code>{
  "param1":"7"
  }
  </code></pre>
  
  <p>But I think I need the code in x-www-form-urlencoded or text format I really do not know.</p>
  
  <p>If I see the "code" generated by Postman in the succesfull post I have this:</p>
  
  <pre><code>POST /.json?auth=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1
  Host: XXXXXXXXXXXXXXX-461a8.firebaseio.com
  Content-Type: application/json
  Cache-Control: no-cache Postman-Token: 2f95151e-52e1-28e7-9583-c0a8f50f77d7
  { "param1":"7" }
  </code></pre>
  
  <p>That's what I have tried to send to GPRS Module and I receive HTTP Error 400 bad request, how I have told at the beginning.</p>
  
  <p>Somebody can help me?</p>
  
  <p>Thank you very much</p>