- Called with the name of an HTTP request header field, returns its value. Capitalization and the use of hyphens versus underscores are not significant.
- Request headers are sent by the browser to the server. It is not possible to access the Response headers returned to the browser.
- Only returns headers permitted by site configuration. Returns '' if the header is not allowed.
- When called without a parameter, nothing is returned. See VarHTTPS for other options.

The HTTP and HTTPS macros are deprecated as of Foswiki release 2.1. and will be removed in a future release.
Parameters
Examples
Write |
Returns |
Notes |
%HTTP% |
|
Always returns '' |
%HTTP{"Accept-language"}% |
zh-cn,zh-tw |
|
%HTTP{"Cookie"}% |
|
Not allowed by default. |
%HTTP{"User-Agent"}% |
Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;) AppleWebKit/534.46 (KHTML,like Gecko) Version/5.1 Mobile Safari/10600.6.3 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) |
|
HTTPS,
REMOTE_ADDR,
REMOTE_PORT,
REMOTE_USER
Topic revision: r1 - 12 Jan 2026, ProjectContributor
- This page was cached on 23 Oct 2026 - 19:13.
Powered by
Foswiki. Wiki content belongs to its contributing authors.