使用Jetbrains http Client的发布请求(表格数据)不工作
对OpenText Content Server的此请求可与卷曲一起使用,但与Jetbrains HTTP客户端不起作用。
curl --location --request POST 'http://myserver/api/v1/auth' \
--form 'username="myuser"' \
--form 'password="mypassword"'
上面的命令按预期工作。
POST myserver.mydomain
Accept: */*
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="username"
myuser
--WebAppBoundary
Content-Disposition: form-data; name="password"
mypassword
--WebAppBoundary--
这不起作用,返回有关错误密码的消息。
我将感谢有关该问题的任何建议。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我应该使用“ content-type:text/plain”。
这很好。
文档:
I should've used "Content-Type: text/plain".
This works just fine.
Documentation: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type