Is there any way I can gain access to the object that implements IHttpRequest so that I can eventually get the HttpServletRequest object?

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 ivy.request object only enables me access to the GET parameters.

asked 26.11.2014 at 14:23

ahatius's gravatar image

accept rate: 0%

edited 26.11.2014 at 14:25

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.

IvyScript Example:

import ch.ivyteam.ivy.request.IHttpRequest;

if (ivy.request instanceof IHttpRequest)
    IHttpRequest httpRequest = ivy.request as IHttpRequest;

answered 26.11.2014 at 16:42

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
accept rate: 74%

Thanks, works just as expected.

(27.11.2014 at 07:53) ahatius ahatius's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 26.11.2014 at 14:23

Seen: 1,139 times

Last updated: 27.11.2014 at 07:53