我们如何通过GraphQl中的空格传递标题参数?
API在GraphQL操场上工作绝对很好。
但是,当我在Postman中使用相同数据测试相同的API时,它给了我一个错误。
{
"errors": [
{
"message": "Context creation failed: Permission denied",
"statusCode": 500
}
]
}
我正在将访问令牌传递到标题中
:
{"authorization":"Bearer accesstoken"}
以这种格式进行邮递员的数据
authorization: Bearer accesstoken
,问题是在携带者中的空白处,并且访问令牌
有什么办法可以通过标头中的whitespaces传递一个值?
我尝试使用%20
和_
。
API is working absolutely fine in graphql playground.
But when I tested the same API with the same data in postman it gave me an error.
{
"errors": [
{
"message": "Context creation failed: Permission denied",
"statusCode": 500
}
]
}
I was passing the access token in the header
like:
{"authorization":"Bearer accesstoken"}
In terms of postman data is going in this format
authorization: Bearer accesstoken
The issue is with the white space in the Bearer and access token
Is there any way we can pass a value with whitespaces in header?
I have tried using %20
and _
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论