Improve docs

This commit is contained in:
sdogruyol 2016-11-10 16:38:29 +03:00
parent ddc92c44e0
commit 8ec9ed8331
5 changed files with 6 additions and 5 deletions

View File

@ -174,7 +174,7 @@ describe "ParamParser" do
body_params.to_s.should eq("")
json_params = Kemal::ParamParser.new(request).json
json_params.should eq({} of String => AllParamTypes)
json_params.should eq({} of String => Nil | String | Int64 | Float64 | Bool | Hash(String, JSON::Type) | Array(JSON::Type))
end
end

View File

@ -79,7 +79,7 @@ def gzip(status : Bool = false)
add_handler HTTP::DeflateHandler.new if status
end
# nodoc:
# :nodoc:
struct UploadFile
getter field : String
getter data : IO::Delimited

View File

@ -70,6 +70,7 @@ module Kemal::Middleware
end
end
# :nodoc:
class Block
property block : HTTP::Server::Context -> String

View File

@ -5,11 +5,11 @@ module Kemal
# ParamParser parses the request contents including query_params and body
# and converts them into a params hash which you can within the environment
# context.
alias AllParamTypes = Nil | String | Int64 | Float64 | Bool | Hash(String, JSON::Type) | Array(JSON::Type)
class ParamParser
URL_ENCODED_FORM = "application/x-www-form-urlencoded"
APPLICATION_JSON = "application/json"
# :nodoc:
alias AllParamTypes = Nil | String | Int64 | Float64 | Bool | Hash(String, JSON::Type) | Array(JSON::Type)
def initialize(@request : HTTP::Request)
@url = {} of String => String

View File

@ -15,7 +15,7 @@ module Kemal
#
# Sessions are pruned hourly after 48 hours of inactivity.
class Sessions
# Session Types are String, Integer, Float and Boolean
# :nodoc:
alias SessionTypes = String | Int32 | Float64 | Bool
# In-memory, ephemeral datastore only.