You are not logged in.
Hello ,
I am using LAMP server on arch linux. I try to use laravel php framework.
curl -X POST http://lbc.dev/api/category -H "Content-Type: application/json" –d '{"code":"cat1", "name":"Category One"}'returns :
<pre>NULL
</pre>curl: (6) Could not resolve host: –d; Name or service not known
[1/2]: "code":"cat1" --> <stdout>
--_curl_--"code":"cat1"
curl: (6) Could not resolve host: "code"; Name or service not known
[2/2]: "name":"Category One" --> <stdout>
--_curl_-- "name":"Category One"
curl: (6) Could not resolve host: "name"; Name or service not knownmy /etc/hosts is like here
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost ytsejam
127.0.0.1 wlog.dev
127.0.0.1 lbc.dev localhost
127.0.0.2 karayel
::1 localhost.localdomain localhostthis is my vhost configuration :
<VirtualHost *:80>
DocumentRoot "/home/ytsejam/public_html/lbc/public"
ServerName lbc.dev
</VirtualHost>What must be done to make curl work for vhost?
Offline
You have U2013 "en dash" in front of d, not U002D "hyphen-minus".
curl rightfully tries to interpret it as a domain name, an IDN to boot.
Offline