I am trying to issue the following command under Windows 10:
D:\>curl -i -X POST -H "Content-Type:application/json" -d '{ "firstName" : "Frodo", "lastName" : "Baggins" }' http://localhost:8080/people
Unfortunately, it produces numerous errors:
curl: (6) Could not resolve host: firstName
curl: (7) Failed to connect to port 80: Connection refused
curl: (6) Could not resolve host: Frodo,
curl: (6) Could not resolve host: lastName
curl: (7) Failed to connect to port 80: Connection refused
curl: (6) Could not resolve host: Baggins
curl: (3) [globbing] unmatched close brace/bracket in column 1
Apparently, it does not understand the syntax.
Why is this, and how can this be fixed?
D:\>curl --version
curl 7.46.0 (x86_64-pc-win32) libcurl/7.46.0 OpenSSL/1.0.2e zlib/1.2.8 WinIDN libssh2/1.6.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz