<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Access IHttpRequest object</title><link>https://answers.axonivy.com/questions/1055/access-ihttprequest-object</link><description>&lt;p&gt;Is there any way I can gain access to the object that implements &lt;a href="http://developer.axonivy.com/doc/5.1.latest/publicApi/ch/ivyteam/ivy/request/IHttpRequest.html"&gt;IHttpRequest&lt;/a&gt; so that I can eventually get the &lt;code&gt;HttpServletRequest&lt;/code&gt; object?&lt;/p&gt;
&lt;p&gt;I'd like to be able to read HTTP-Headers from within the application (I'm not talking about GET or POST parameters, I want the HTTP Headers). The &lt;code&gt;ivy.request&lt;/code&gt; object only enables me access to the GET parameters.&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1055/access-ihttprequest-object" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 27 Nov 2014 07:53:40 -0500</lastBuildDate><item><title>Comment by ahatius on Reto Weiss's answer</title><link>https://answers.axonivy.com/questions/1055/access-ihttprequest-object#1059</link><description>&lt;p&gt;Thanks, works just as expected.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ahatius</dc:creator><pubDate>Thu, 27 Nov 2014 07:53:40 -0500</pubDate><guid>https://answers.axonivy.com/questions/1055/access-ihttprequest-object#1059</guid></item><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1055/access-ihttprequest-object/1056</link><description>&lt;p&gt;You can cast the ivy.request to a IHttpRequest. Be careful not every ivy.request is a IHttpRequest! For example if you are running in system task the ivy.request is not a IHttpRequest.&lt;/p&gt;
&lt;p&gt;IvyScript Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import ch.ivyteam.ivy.request.IHttpRequest;

if (ivy.request instanceof IHttpRequest)
{
    IHttpRequest httpRequest = ivy.request as IHttpRequest;
    httpRequest.getHttpServletRequest().getHeader("blah");
}
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Wed, 26 Nov 2014 16:42:09 -0500</pubDate><guid>https://answers.axonivy.com/questions/1055/access-ihttprequest-object/1056</guid></item></channel></rss>