インフラ系SEの技術メモ

雑なエンジニアが低信頼性のメモを書いています。参考程度にとどめてください。

(curlエラー)Mark bundle as not supporting multiuse HTTP/1.1 400 Bad Requestと出た

curlでPOSTをするも

vオプションをつけた結果は以下エラーに。

Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying ...
* Connected to l...
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* ALPN: server accepted http/1.1
> POST /smartapp/issues.json HTTP/1.1
> Host: ...
> User-Agent: curl/7.83.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 819
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Server: nginx
< Date: Tue, 18 Oct 2022 03:39:02 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 0
< Connection: keep-alive
< X-Request-Id: f...
< X-Runtime: ...
<
* Connection ... left intact

httpsで送っているのにhttpがどうのこうのといっていて心当たりがないな~と思っていました。

JSONファイルがおかしかった

結論として、curlの中でJSONファイルを送っていたのですが、そこが構文エラー。
具体的には

a : "xxx",
b : "ccc",

みたいに書くべきところが

a : "xxx,
b : "ccc",

とダブルクオーテーションが抜けていました。

そうなるとこんなエラーになるんですね。メモメモ。