Sha256: 59f1ccbe7689c6578416819ccf8876ab2f8ae6a59c0b5432c813b639963cc674
Contents?: true
Size: 901 Bytes
Versions: 1
Compression:
Stored size: 901 Bytes
Contents
require 'java' java_import 'org.springframework.mock.web.MockHttpServletRequest' java_import 'javax.servlet.http.HttpServletRequest' module Reigns class HttpRequest include Java::JavaxServletHttp::HttpServletRequest def initialize @content = "" @delegate = MockHttpServletRequest.new yield self if block_given? end def method_missing(method, *args, &block) @delegate.send(method, *args) end def method=(method_string) @delegate.set_method(method_string) end def method @delegate.get_method end def uri=(uri_string) @delegate.set_request_uri(uri_string) end def uri @delegate.get_request_uri end def content=(content_string) @content = content_string @delegate.set_content(content_string.to_java_bytes) end def content @content end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reigns-1.0.1-java | lib/reigns/http_request.rb |