Sha256: 8fb0b9396a0818b836ec54b8939ab175ebe0c07391d3f485c5f96e6185f43229
Contents?: true
Size: 367 Bytes
Versions: 7
Compression:
Stored size: 367 Bytes
Contents
Toycol::Protocol.define(:rubylike) do custom_status_codes( 700 => "Hmm...", ) additional_request_methods "OTHER" request.path do |message| /['"](?<path>.+)['"]/.match(message)[:path] end request.http_method do |message| case /\.(?<method>[A-z]+)/.match(message)&.captures&.first when "get" then "GET" else "OTHER" end end end
Version data entries
7 entries across 7 versions & 1 rubygems