mirror of
https://github.com/lloeki/nanoserve.git
synced 2025-12-06 03:04:39 +01:00
Implement request body and normalized headers access
This commit is contained in:
parent
dc8739c692
commit
dd5001cb7c
1 changed files with 8 additions and 0 deletions
|
|
@ -102,6 +102,14 @@ module NanoServe
|
|||
Hash[*@uri.query.split('&').map { |kv| kv.split('=') }.flatten]
|
||||
end
|
||||
|
||||
def body
|
||||
@body
|
||||
end
|
||||
|
||||
def [](key)
|
||||
@headers[key.downcase]
|
||||
end
|
||||
|
||||
def <<(line)
|
||||
if @method.nil?
|
||||
parse_request(line.chomp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue