阿呆的行迹
# 结构体绑定的那一章节,这种json参数请求就提示
# person bind error parsing time ""2020-10-10"" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "T"%
curl -H "Content-Type:application/json" -X POST "http://localhost:8080/test" -d '{"name":"a","address":"bj","birthday":"2020-10-10"}'
# 结构体绑定的那一章节,这种json参数请求就提示
# person bind error parsing time ""2020-10-10"" as ""2006-01-02T15:04:05Z07:00"": cannot parse """ as "T"%
curl -H "Content-Type:application/json" -X POST "http://localhost:8080/test" -d '{"name":"a","address":"bj","birthday":"2020-10-10"}'
2021-03-23
获取uri中你的参数=>在回调方法里:获取不带默认值的指定参数:使用Context实体的Query方法c.Query(paramname),获取有默认值的参数DefaultQuery
2021-02-17
curl -d "{\"name\":\"tom\",\"age\":\"12\",\"address\":\"wuhan\"}"
windows环境使用curl, -d参数内容尽量用双引号,否则报错:
EXTRA *json.SyntaxError=invalid character '\'' looking for beginning of value
windows环境使用curl, -d参数内容尽量用双引号,否则报错:
EXTRA *json.SyntaxError=invalid character '\'' looking for beginning of value
2021-01-15