struct HttpCall

Included Modules

Defined in:

cli/data/http_call.cr
cli/proto/HttpCall.pb.cr

Constant Summary

FIELDS = {1 => {name: :url, pb_type: :string, crystal_type: String, cast_type: String, native: true, optional: false, repeated: false, default: nil, packed: false}, 2 => {name: :method, pb_type: :string, crystal_type: String, cast_type: String, native: true, optional: false, repeated: false, default: nil, packed: false}, 3 => {name: :header, pb_type: :string, crystal_type: String, cast_type: String, native: true, optional: false, repeated: false, default: nil, packed: false}, 4 => {name: :body, pb_type: :string, crystal_type: String, cast_type: String, native: true, optional: false, repeated: false, default: nil, packed: false}, 5 => {name: :requested_at, pb_type: Datetime, crystal_type: Datetime, cast_type: Datetime, native: false, optional: false, repeated: false, default: nil, packed: false}, 6 => {name: :responsed_at, pb_type: Datetime, crystal_type: Datetime, cast_type: Datetime?, native: false, optional: true, repeated: false, default: nil, packed: false}, 7 => {name: :status, pb_type: :int32, crystal_type: Int32, cast_type: Int32?, native: true, optional: true, repeated: false, default: nil, packed: false}, 8 => {name: :res_header, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}, 9 => {name: :res_body, pb_type: :string, crystal_type: String, cast_type: String?, native: true, optional: true, repeated: false, default: nil, packed: false}} of Int32 => HashLiteral(Symbol, ASTNode)
Fields = {} of String => Field

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(url : String, method : String, header : String, body : String, requested_at : Datetime, responsed_at : Datetime | Nil = nil, status : Int32 | Nil = nil, res_header : String | Nil = nil, res_body : String | Nil = nil) #

def self.new(buf : Protobuf::Buffer) #

def self.new(pull : JSON::PullParser) #

Class Method Detail

def self.from_protobuf(io) #

Instance Method Detail

def [](key : String) #

def []=(key : String, val) #

def []?(key : String) #

def body : String #

def body=(body : String) #

def header : String #

def header=(header : String) #

def inspect(io : IO) #
Description copied from struct Struct

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"

[View source]
def method : String #

def method=(method : String) #

def requested_at : Datetime #

def requested_at=(requested_at : Datetime) #

def res_body : String | Nil #

def res_body=(res_body : String | Nil) #

def res_header : String | Nil #

def res_header=(res_header : String | Nil) #

def responsed_at : Datetime | Nil #

def responsed_at=(responsed_at : Datetime | Nil) #

def status : Int32 | Nil #

def status=(status : Int32 | Nil) #

def to_hash #

def to_protobuf(io : IO, embedded = false) #

def to_protobuf #

def to_s(io : IO) #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def uri #

[View source]
def url : String #

def url=(url : String) #