首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Powershell HTTPIE

Powershell HTTPIE
EN

Stack Overflow用户
提问于 2018-11-01 19:13:21
回答 1查看 382关注 0票数 0

我试图发布以下内容,但一直有一个错误:

"http: error:参数REQUEST_ITEM:"with“不是有效值”

http POST https://someurl.com fields:='{\"example-api-identifier\":\"String with spaces\"}' Token:randomnumbers

我该如何逃离这些空间?我想这就是问题所在吧?

EN

回答 1

Stack Overflow用户

发布于 2020-02-01 00:28:55

我个人对powershell并不了解,但是httpie在不需要:=语法的情况下可以使用空格。

代码语言:javascript
复制
$ http POST http://httpbin.org/post example-api-identifier="String with spaces"

收益率

代码语言:javascript
复制
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Connection: close
Content-Length: 413
Content-Type: application/json
Date: Sat, 01 Feb 2020 00:25:41 GMT
Server: gunicorn/19.9.0

{
    "args": {},
    "data": "{\"example-api-identifier\": \"String with spaces\"}",
    "files": {},
    "form": {},
    "headers": {
        "Accept": "application/json, */*",
        "Accept-Encoding": "gzip, deflate",
        "Connection": "keep-alive",
        "Content-Length": "48",
        "Content-Type": "application/json",
        "Host": "httpbin.org",
        "User-Agent": "HTTPie/1.0.0"
    },
    "json": {
        "example-api-identifier": "String with spaces"
    },
    "origin": "127.0.0.1",
    "url": "http://httpbin.org/post"
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53107894

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档