HTTP

module HTTP

Overview

The HTTP module contains HTTP::Client, HTTP::Server and HTTP::WebSocket implementations.

Defined in:

http/client.cr
http/common.cr
http/params.cr
http/content.cr
http/cookie.cr
http.cr

Class Method Summary

Class Method Detail

def self.default_status_message_for(status_code : Int) : StringSource

Returns the default status message of the given HTTP status code.

def self.dequote_string(str)Source

Dequotes an RFC 2616 quoted-string.

quoted = %q(\"foo\\bar\")
HTTP.dequote_string(quoted) # => %q("foo\bar")

def self.parse_time(time_str : String) : Time?Source

def self.quote_string(string, io)Source

Encodes a string to an RFC 2616 quoted-string. Encoded string is written to io. May raise when string contains an invalid character.

string = %q("foo\ bar")
io = IO::Memory.new
HTTP.quote_string(string, io)
io.gets_to_end # => %q(\"foo\\\ bar\")

def self.quote_string(string)Source

Encodes a string to an RFC 2616 quoted-string. May raise when string contains an invalid character.

string = %q("foo\ bar")
HTTP.quote_string(string) # => %q(\"foo\\\ bar\")

def self.rfc1123_date(time : Time) : StringSource

def self.serialize_chunked_body(io, body)Source

def self.serialize_headers(io, headers)Source

def self.serialize_headers_and_string_body(io, headers, body)Source

© 2012–2017 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.22.0/HTTP.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部