title: Accessing request object in src/groovy file in grails
body: <p>How can we access request object in <code>src/groovy</code> files in grails. Is it possible?.</p>
  
  <p>I don't want to  pass request object from controller to <code>src/groovy</code> files through method parameter because it's an existing framework, is there any alternative way to do it.</p>
  
  <p>I am only need request ContentType.</p>
  
  <p>If getting request object is not possible in <code>src/groovy</code> then i am planning to put that in <code>ThreadLocal</code> class and get there, is this a good idea?</p>