来自 gsoap 标头的 http 状态
有人知道如何在 gSoap 中检索 http 状态吗?
我有“HTTP/1.1 202 ACCEPTED...”并且我想以某种方式打印 202 。
does anybody knows how to retrieve the http status in gSoap?
I have "HTTP/1.1 202 ACCEPTED..." and I want to print the 202 somehow.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的问题很模糊,所以我将假设字面解释,你实际上是在问一个 C 问题...你说你有“HTTP/1.1 202 ACCEPTED...”,并且你想以某种方式打印 202 。以下是在 C 中执行此操作的方法:
如果这不是您想要的,请更具体地说明您的问题。
问候,
雷克
Your question is vague, so I am going to assume a literal interpretation and that you are really asking a C question... You say you have "HTTP/1.1 202 ACCEPTED...", and that you want to print the 202 somehow. Here is how you would do that in C:
If this is not what you wanted, please be more specific in your question.
Regards,
Ryyker
Web 服务调用完成后,您将收到错误代码 202。就是这么简单。除 200/400/500 之外的所有 HTTP 代码都会“按原样”传递给调用者,因此您可以捕获这些代码。只需检查
soap->error == 202
的值是否即可。After the web service invocation completes you will receive an error code of 202. It's that simple. All HTTP codes except 200/400/500 are passed down to the caller "as-is", so you can catch these. Just check if the value of
soap->error == 202
.