我是靠谱客的博主 乐观奇迹,最近开发中收集的这篇文章主要介绍EVE:[globbing] unmatched close brace/bracket in column 6,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

根据官方教程,在命令行中使用curl执行下面命令:

curl -d '[{"firstname": "barack", "lastname": "obama"}, {"firstname": "mitt", "lastname": "romney"}]' -H 'Content-Type: application/json'
http://127.0.0.1:5000/people

出现了如下错误:

curl: (6) Could not resolve host: barack,
curl: (6) Could not resolve host: lastname
curl: (3) [globbing] unmatched close brace/bracket in column 6
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: mitt,
curl: (6) Could not resolve host: lastname
curl: (3) [globbing] unmatched close brace/bracket in column 7
curl: (6) Could not resolve host: application
{"_status": "ERR", "_issues": {"'[{firstname:": "unknown field", "lastname": "required field"}, "_error": {"code": 422, "message": "Insertion failure: 1 document(s) contain(s) error(s)"}}

原因是由于我使用的是windows系统,而window的command.exe似乎不支持单引号,所以只要将其中的单引号改为双引号,并转义字符串中的任何双引号

curl -d "[{"firstname": "barack", "lastname": "obama"}, {"firstname": "mitt", "lastname": "romney"}]" -H "Content-Type: application/json" http://127.0.0.1:5000/people

 

最后

以上就是乐观奇迹为你收集整理的EVE:[globbing] unmatched close brace/bracket in column 6的全部内容,希望文章能够帮你解决EVE:[globbing] unmatched close brace/bracket in column 6所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部