Module: Murlsh::HeadFromGet

Included in:
ConfigServer, UrlServer
Defined in:
lib/murlsh/head_from_get.rb

Overview

Mixin for adding head() that calls get() and removed the body.

Instance Method Summary collapse

Instance Method Details

#head(req) ⇒ Object

Call get() and remove the body.



7
8
9
10
11
# File 'lib/murlsh/head_from_get.rb', line 7

def head(req)
  resp = get(req)
  resp.body = ''
  resp
end