Class: Wreq::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/wreq_ruby/http.rb

Overview

HTTP method enumeration backed by Rust.

Variants are exposed as constants under this class. Each constant is an instance of Method.

Examples:

Using predefined constants

method = Wreq::Method::GET
method.class #=> Wreq::Method

In request context

Wreq.request(url: "https://api.example.com", method: Wreq::Method::POST)

Constant Summary collapse

GET =

Returns HTTP GET method.

Returns:

nil
HEAD =

Returns HTTP HEAD method.

Returns:

nil
POST =

Returns HTTP POST method.

Returns:

nil
PUT =

Returns HTTP PUT method.

Returns:

nil
DELETE =

Returns HTTP DELETE method.

Returns:

nil
OPTIONS =

Returns HTTP OPTIONS method.

Returns:

nil
TRACE =

Returns HTTP TRACE method.

Returns:

nil
PATCH =

Returns HTTP PATCH method.

Returns:

nil

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



47
48
# File 'lib/wreq_ruby/http.rb', line 47

def ==(other)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


55
56
# File 'lib/wreq_ruby/http.rb', line 55

def eql?(other)
end

#hashObject



62
63
# File 'lib/wreq_ruby/http.rb', line 62

def hash
end

#to_sObject



32
33
# File 'lib/wreq_ruby/http.rb', line 32

def to_s
end

#to_symObject



39
40
# File 'lib/wreq_ruby/http.rb', line 39

def to_sym
end