从 REST Web 服务返回图像
我需要从我的休息网络服务返回图像。我怎样才能实现这个目标?此外,最好的方法是什么?我应该发送图像链接还是直接从网络服务返回图像?返回给客户的图像是保密的。请帮忙。
I need to return an image from my rest web service. How can I achieve this? Furthermore, What would be the best way to do that? Should I send a link to my image or return the image directly from my web service? The image to be returned to the client is confidential. Plz help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果它是 SOAP,您可以使用 MTOM 添加图像作为响应。正如您提到的,您正在使用 REST,以下问题可能会对您有所帮助:
是否可以使用 MTOM响应 CXF RESTful Web 服务
If it is a SOAP you can use MTOM to add your image in response. As you mentioned that you are using REST, following question may help you:
Is it possible to use MTOM in reponse of CXF RESTful Web Service