如何将标题添加到< img>中的请求网址SRC? [英] How to add headers to the request url in <img> src?
本文介绍了如何将标题添加到< img>中的请求网址SRC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< img src ='https://example.com/getImage?q = img_ref'/ >
而 https://example.com/getImage
要求我们发送一些指定的头文件以使请求有效。是否有可能,或者我必须为此使用ajax?
解决方案
该工具无法通过HTML访问。我会把它作为一个Ajax请求。
Example:
<img src='https://example.com/getImage?q=img_ref' />
And the https://example.com/getImage
requires us to send some specified headers to make the request valid. Is it possible, or do I have to use ajax for this?
解决方案
That facility isn't available through HTML. I would make it as an ajax request.
这篇关于如何将标题添加到< img>中的请求网址SRC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文