cURL 不适用于本地主机
cURL not working with localhost
我使用的是 CentOS 6.5,当我给出以下命令时,curl 工作正常并且 returns 我得到了正确的输出:
curl --data "atoken=0564af8vabe91f2d1a82fb1j375345733e35b707" http://www.mywebsite.com/something.json
但是,我在本地机器上需要同样的东西。在这种情况下,它不起作用:
curl --data "atoken=0564af8vabe91f2d1a82fb1j375345733e35b707" http://localhost/something.json
它给出错误,输出如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Action Controller: Exception caught</title>
<style>
body {...
请帮忙。
另外,如何获取本地主机的令牌?
Curl 正在运行...无法运行的是 JSON 服务。它期待未获取的数据,或者未在本地主机上正确配置。
我使用的是 CentOS 6.5,当我给出以下命令时,curl 工作正常并且 returns 我得到了正确的输出: curl --data "atoken=0564af8vabe91f2d1a82fb1j375345733e35b707" http://www.mywebsite.com/something.json
但是,我在本地机器上需要同样的东西。在这种情况下,它不起作用:
curl --data "atoken=0564af8vabe91f2d1a82fb1j375345733e35b707" http://localhost/something.json
它给出错误,输出如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Action Controller: Exception caught</title>
<style>
body {...
请帮忙。 另外,如何获取本地主机的令牌?
Curl 正在运行...无法运行的是 JSON 服务。它期待未获取的数据,或者未在本地主机上正确配置。