title: Bad Request error when calling HTTP_POST?
body: <p>I have a question about the SAP Function Module &quot;http_post&quot;.
  I just want to post a short message (msg) out of the SAP to a Push Notification Server (pushd-Github-Projekt) I installed before. Now I'm not sure how to pass the message.</p>
  <p>I tested the FM with the test-symbol:</p>
  <pre><code>CALL FUNCTION 'HTTP_POST'
    exporting
      ABSOLUTE_URI                =     uri &quot; Uniform Resource Identifier (RFC 1945)
  *    REQUEST_ENTITY_BODY_LENGTH  =     14 &quot;request_entity_body_length
  *    RFC_DESTINATION             =     &quot; RFC Destination
  *    PROXY                       =     &quot; HTTP Proxy Rechner
  *    PROXY_USER                  =     &quot; Benutzername auf dem Proxy Rechner
  *    PROXY_PASSWORD              =     &quot; Passwort auf dem Proxy Rechner
  *    USER                        =     &quot; Benutzername auf dem HTTP Server
  *    PASSWORD                    =     &quot; Passwort auf dem HTTP Server
  *    BLANKSTOCRLF                =     &quot; Blanks in CRLF konvertieren im Entity Body
  *  importing
  *    STATUS_CODE                 =     &quot; Statuscode ( 2xx = OK )
  *    STATUS_TEXT                 =     &quot; Text zum Statuscode
  *    RESPONSE_ENTITY_BODY_LENGTH =     &quot; Länge vom Response-Entity-Body
    tables
      REQUEST_ENTITY_BODY         =    '{&quot;msg&quot;:&quot;test&quot;}' &quot;request_entity_body 
      RESPONSE_ENTITY_BODY        =    '' &quot; Response-Entity-Body Daten
      RESPONSE_HEADERS            =    '' &quot; Header Zeilen vom Response
      REQUEST_HEADERS             =    'Content-Type: application/json' &quot;request_headers
  *  exceptions
  *    CONNECT_FAILED              = 1
  *    TIMEOUT                     = 2
  *    INTERNAL_ERROR              = 3
  *    TCPIP_ERROR                 = 4
  *    SYSTEM_FAILURE              = 5
  *    COMMUNICATION_FAILURE       = 6
  *    OTHERS                      = 7
    .
  </code></pre>
  <p>I know my values are no tables, but I tested it with the test-symbol, where you can write the values directly in a table.
  When I start the FM, I get an <strong>Bad Request error in the SAP</strong>
  and this error at the push notification server:</p>
  <pre><code>SyntaxError: Unexpected token
  at Object.parse (native)
  at IncomingMessage.&lt;anonymous&gt; ...Path from the pushd..
  express\node_modules\connect\lib\middleware\json.js:76:27
  at incomingMessage.EventEmitter.emit events.js:92:17
  at _stream:readable.js:919:16
  at process._tickCallback &lt;node.js:419:13&gt;
  </code></pre>
  <p>Can anyone help me how to pass the request to the FM HTTP-Post? It has to be sth. with msg, because otherwise the Push-Notification-Server can't handle it.</p>