(Quick Reference)

request

目的
Purpose

The request object is an instance of the Servlet API's HttpServletRequest class

使用例
Examples

class BookController {
    def list() {
        log.info "User agent: ${request.getHeader("User-Agent")}"

render(view: actionName) } }

詳細
Description

The HttpServletRequest class is useful for, amongst other things, obtaining request headers, storing request scoped attributes and establishing information about the client. Refer to the Servlet API's javadocs for further information.

The additional methods added to the request object are documented in the Grails Servlet API reference guide