从不是URL的REST API显示PNG

时间:2018-08-07 21:39:25

标签: http dart flutter

我有一个REST终结点,当我使用它时(需要几个标头的GET终结点),它返回一个图像,但没有URL。使用Postman,我得到如下原始响应:

HTTP/1.1 200 OK
Date: Tue, 07 Aug 2018 21:26:33 GMT
Server: Apache
Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE, HEAD
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Authorization, Origin, X-c2b-Authorization, X-c2b-mTAN, X-Requested-With, X-c2b-Sender-Id, Content-Type, Accept, Cache-Control
Max-Forwards: 20
Via: 3.1 lp10b2wxdpp02 (Some Random Gateway)
X-CorrelationID: Id-880e6a5b74d00f00000000008ee4edd1 0
X-Frame-Options: SAMEORIGIN
X-NodeID: 02
X-Powered-By: JOY
Content-Type: image/png
Connection: close
Transfer-Encoding: chunked

PNG
...

我已经从Flutter网站上检查了这个食谱:https://flutter.io/cookbook/images/network-image/但是,它假定您正在传递URL,鉴于给出的响应,我不能这样做。有任何想法吗?谢谢!

0 个答案:

没有答案