简体   繁体   English

HTML中的自定义HTTP请求标头

[英]Custom HTTP Request headers in HTML

Does anyone know if its possible to send out custom http REQUEST headers in HTML without having to use javascript (no xhr wrapper). 有没有人知道它是否可以在HTML中发送自定义http REQUEST标头而不必使用javascript(没有xhr包装器)。

Would it be possible to define them as meta tags within the head? 是否可以将它们定义为头部中的元标记? Or may they be defined in the form somewhere? 或者他们可能在某个地方定义?

<meta http-equip="x-something-custom" name="custom value" />

this works, however, this is a RESPONSE header. 但是,这是一个RESPONSE标头。 What I need to set a REQUEST header. 我需要设置一个REQUEST标头。

I'm not looking for setting hidden fields in forms, but actual raw http header manipulation with html tags. 我不是在寻找在表单中设置隐藏字段,而是使用html标签进行实际原始http标头操作。

Is this possible? 这可能吗?

Does anyone know if it's possible to send out custom HTTP request headers in HTML without having to use JavaScript? 有谁知道是否可以在HTML中发送自定义HTTP请求标头而无需使用JavaScript?

No, it's not possible. 不,这是不可能的。

What is it, the functional requirement for which you think that this is the solution? 什么是您认为这是解决方案的功能要求? Elaborate that, then we may be able to come up with a suitable solution. 详细说明,然后我们可以提出合适的解决方案。

Why do you need to set something in the header? 为什么需要在标题中设置内容?

If it's for testing you can use a Firefox extension or a web proxy to manipulate the header. 如果是用于测试,您可以使用Firefox扩展Web代理来操作标头。

Otherwise, it cannot be done from HTML . 否则, 无法从HTML完成

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM