[SOLVED] Curl(?) differences linux/windows

using “-g” curl complains about an illegal port number:

executing tmp2.cmd

curl -g -v -d ‘payload={“text”: “Hel
lo this is some text\nThis is more text. :tada:”}’ myhostname/hooks/nfxohn48ijdajpuu6awg93j6sw

  • Rebuilt URL to: Hello this is some text\nThis is more text. :tada:}'/
  • Illegal port number
  • Closing connection -1
    curl: (3) Illegal port number
  • timeout on name lookup is not supported
  • Trying a.b.c.xxx…
  • TCP_NODELAY set
  • Connected to xxx.kreis-steinfurt.lokal (a.b.c.xxx) port 80 (#0)

POST /hooks/nfxohn48ijdajpuu6awg93j6sw HTTP/1.1
Host: xxx.kreis-steinfurt.lokal
User-Agent: curl/7.53.1
Accept: /
Content-Length: 15
Content-Type: application/x-www-form-urlencoded

  • upload completely sent off: 15 out of 15 bytes
    < HTTP/1.1 400 Bad Request
    < Server: nginx/1.4.6 (Ubuntu)
    < Date: Thu, 31 Aug 2017 05:56:17 GMT
    < Content-Type: application/json
    < Content-Length: 179
    < Connection: keep-alive
    < Access-Control-Allow-Origin:
    < X-Request-Id: 3qn34pacb7g68d1q3ese1pmwha
    < X-Version-Id: 4.1.0.4.1.0.d4dab482fe7337cd6e0d9619e0685522.false
    <
    {“id”:“web.incoming_webhook.parse.app_error”,“message”:“Konnte eingehende Daten
    nicht verarbeiten”,“detailed_error”:“”,“request_id”:“3qn34pacb7g68d1q3ese1pmwha”
    ,“status_code”:400}* Connection #0 to host xxx.kreis-steinfurt.lokal left i
    ntact

Regarding escaping the double-qoutes: Using “^” (caret) as escape changes nothing.
Using unix-style “\” every string separated by spaces after the first string
'payload={\"Text\":
is treated as a url.

Thanks for your help
Hermann-Josef Beckers