just tried as your code, changed only part of name and part of pass
&"C:\Windows\SysWOW64\curl.exe" -kv -X POST "
https://172.21.2.6/web_api/login" -d '{"user": "name-admin", "password": "pass__"}' -H "Content-Type: application/json"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 172.21.2.6...
* TCP_NODELAY set
* Connected to 172.21.2.6 (172.21.2.6) port 443 (#0)
* schannel: SSL/TLS connection with 172.21.2.6 port 443 (step 1/3)
* schannel: disabled server certificate revocation checks
* schannel: verifyhost setting prevents Schannel from comparing the supplied target name with the subject names in server certificates.
* schannel: using IP address, SNI is not supported by OS.
* schannel: sending initial handshake data: sending 147 bytes...
* schannel: sent initial handshake data: sent 147 bytes
* schannel: SSL/TLS connection with 172.21.2.6 port 443 (step 2/3)
* schannel: encrypted data got 4096
* schannel: encrypted data buffer: offset 4096 length 4096
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with 172.21.2.6 port 443 (step 2/3)
* schannel: encrypted data got 1024
* schannel: encrypted data buffer: offset 5120 length 5120
* schannel: received incomplete message, need more data
* schannel: SSL/TLS connection with 172.21.2.6 port 443 (step 2/3)
* schannel: encrypted data got 384
* schannel: encrypted data buffer: offset 5504 length 6144
* schannel: sending next handshake data: sending 318 bytes...
* schannel: SSL/TLS connection with 172.21.2.6 port 443 (step 2/3)
* schannel: encrypted data got 51
* schannel: encrypted data buffer: offset 51 length 6144
* schannel: SSL/TLS handshake complete
* schannel: SSL/TLS connection with 172.21.2.6 port 443 (step 3/3)
* schannel: stored credential handle in session cache
> POST /web_api/login HTTP/1.1
> Host: 172.21.2.6
> User-Agent: curl/7.55.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 40
>
* upload completely sent off: 40 out of 40 bytes
* schannel: client wants to read 102400 bytes
* schannel: encdata_buffer resized 103424
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: encrypted data got 387
* schannel: encrypted data buffer: offset 387 length 103424
* schannel: decrypted data length: 358
* schannel: decrypted data added: 358
* schannel: decrypted data cached: offset 358 length 102400
* schannel: encrypted data buffer: offset 0 length 103424
* schannel: decrypted data buffer: offset 358 length 102400
* schannel: schannel_recv cleanup
* schannel: decrypted data returned 358
* schannel: decrypted data buffer: offset 0 length 102400
< HTTP/1.1 400 Bad Request
< Date: Tue, 11 Jun 2019 05:40:17 GMT
< Server: CPWS
< X-Frame-Options: SAMEORIGIN
< Content-Type: application/json
< X-UA-Compatible: IE=EmulateIE8
< X-Forwarded-Host-Port: 443
< Connection: close
< Transfer-Encoding: chunked
<
{
"code" : "generic_err_invalid_syntax",
"message" : "Login request message processing failed"
}* Closing connection 0
* schannel: shutting down SSL/TLS connection with 172.21.2.6 port 443
* schannel: clear security context handle