使用CURL使用查询参数发出GET请求

ush*_*sha 5 rest console curl ruby-on-rails query-parameters

我从控制台发出以下curl请求来测试我的一个REST API

curl -X GET "http://localhost/api/v1/user/search.json?search_model[first_name]=abc&auth_token=xyzf"
Run Code Online (Sandbox Code Playgroud)

但它失败了以下错误

curl: (3) [globbing] error: bad range specification after pos 58
Run Code Online (Sandbox Code Playgroud)

我用端口封装了,"因为&它用于在控制台中执行珍贵的命令.我还缺少什么?为什么我会收到此错误?

Ste*_*ard 9

steve>curl --help | grep glob
 -g, --globoff       Disable URL sequences and ranges using {} and []
Run Code Online (Sandbox Code Playgroud)

尝试添加-g.