卷曲(3)和“使用错误/非法格式或缺少URL的URL”; [英] curl (3) and "URL using bad/illegal format or missing URL"
本文介绍了卷曲(3)和“使用错误/非法格式或缺少URL的URL”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在试图弄清楚为什么现在不能运行这段代码。
I have been trying to figure out why i cant run this piece of code for a while now.
curl -X POST '<a href="http://tp-api.herokuapp.com/beacons/" rel="nofollow">tp-api-server.herokuapp.com/beacons</a>' -H 'Content-Type: application/json' -d '{"beacons": [{"id": "a", "location": [10, 0]}, {"id": "b", "location": [0, 10]}, {"id": "c", "location": [0, 0]} ]}'
输出:
卷曲:(3)使用错误/非法格式或缺少URL的URL
curl: (3) URL using bad/illegal format or missing URL
我们将不胜感激
推荐答案
我检查了URL'tp-api-server.herokuapp.com/beacons',并且其中没有您在帖子请求中提到的任何键 id。
I checked the URL 'tp-api-server.herokuapp.com/beacons' , and it doesn't have any key as "id" which you have mentioned in your post request.
尝试一下,{信标:{ a:[10,0], b:[0,10], c:[0,0]}}
Try this , {"beacons": {"a": [10, 0], "b": [ 0, 10], "c": [ 0, 0] }}
这篇关于卷曲(3)和“使用错误/非法格式或缺少URL的URL”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文