Re: [Cppcms-users] Get HTTP Headers of Request
Brought to you by:
artyom-beilis
|
From: Julian P. <ju...@wh...> - 2010-08-25 11:33:17
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 25.08.2010 13:05, schrieb augustin:
> On Wednesday 25 August 2010 06:29:35 pm Julian Pietron wrote:
>> Hi,
>>
>> how can I get a certain header sent with the client's request? I was
>> looking for a method like std::string request().header("which-header");,
>> but didn't find a method like this.
>> Could one please point me to the method I can use to get a http header?
>> The problem is, that it's a custom header, so the methods from
>> http::request for standard headers won't suffice.
>
> Hi Julian,
>
> Won't this fit your needs?
>
> void cppcms::http::response::set_header ( std::string const & name,
> std::string const & value )
> <http://art-blog.no-
> ip.info/cppcms_ref_v0_99/classcppcms_1_1http_1_1response.html#37b0c6c284c9d8f319a87c86d182f021>
>
>
> I am not yet familiar which forms can headers take, but I just came across
> this, so I thought I'd mention it.
>
>
> Augustin.
>
Hi,
thanks for your reply, but this is not the method I need: It will set
custom headers on the response, but I need to gain a custom reader from
the request (i.e. from the HTTP request the client sent). Setting the
custom header (which is done on an Ajax request, btw) is not the problem.
Julian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJMdP9xAAoJENidYKvYQHlQ78UP/RDJfXRyOPOvyt1J5eJJaBk9
lbAJvtlFMKcZnRKtSukZ2zJfr6uFoRGAlrLrP3aOx579OvwdrkQsPzaZG1DrwTl6
FwE0iIH25TRbhU2rxXfIRl5E/K6lo8OYE9T9NI9/7aQwSf991imKIx4P6QqmVaGF
YePh+LGFuHM25YApN7iKiBnz2k8yAe9if+ZWGwh/XmCYX5lzGyitJtU2oY6zDTFQ
6jM7tqj/7C2zbWVWm4r8x0CE1dz7o77C6Hz2vCSXOVo/p15yqJCIhZeYdFev3DsI
KbLxpB1ReWU7LX36+fVmBS9+qJVD+46W4i7k3hkhw3b0yTB8JKsyqkVmdvQpoKj/
lsPP9AwuIelX6eQoxW9s0ZYr7y9d0C/iDzSMvSIY6PzWFKcRNfdjmDlbyltCggoP
/7RJ7wYIfl3JaUwghOFfXyEGa4IpKYUHsIkc0kBL+YxeH+KLteIOqYOVXWihoJrB
y7CDoxlA9jHYV8jdK9MRaHQeBA5/xELexCcfSpov9eD1DcbzLD9oQ4DIRN2y8KN2
NET1FWWIk8/fyr4tq/ovhXXWn1P2LhwhBBr5BgnkFXfRtFz/vff1u0jBB2lkCPfp
V7b2H4XndHZSaZeTDPbpiXmygl8G2oUHeIqfYRD4wfVxa6BDhtswXfv12AoXDdZP
9Z3TfpWyJ+cOGnc5bgKy
=oQnx
-----END PGP SIGNATURE-----
|