Module: EDI::HTTPUtilities::ClassMethods

Defined in:
lib/edi/http_utilities.rb

Instance Method Summary collapse

Instance Method Details

#decode_uri(str) ⇒ Object



31
32
33
# File 'lib/edi/http_utilities.rb', line 31

def decode_uri(str)
  URI.decode(str)
end

#delete(path, options = {}, &block) ⇒ Object



23
24
25
# File 'lib/edi/http_utilities.rb', line 23

def delete(path, options={}, &block)
  EDI::API::Response.new HTTParty.delete(path, options, &block)
end

#encode_uri(str) ⇒ Object



27
28
29
# File 'lib/edi/http_utilities.rb', line 27

def encode_uri(str)
  URI.encode(str)
end

#get(path, options = {}, &block) ⇒ Object

HTTP Requests



7
8
9
# File 'lib/edi/http_utilities.rb', line 7

def get(path, options={}, &block)
  EDI::API::Response.new HTTParty.get(path, options, &block)
end

#patch(path, options = {}, &block) ⇒ Object



15
16
17
# File 'lib/edi/http_utilities.rb', line 15

def patch(path, options={}, &block)
  EDI::API::Response.new HTTParty.patch(path, options, &block)
end

#post(path, options = {}, &block) ⇒ Object



11
12
13
# File 'lib/edi/http_utilities.rb', line 11

def post(path, options={}, &block)
  EDI::API::Response.new HTTParty.post(path, options, &block)
end

#put(path, options = {}, &block) ⇒ Object



19
20
21
# File 'lib/edi/http_utilities.rb', line 19

def put(path, options={}, &block)
  EDI::API::Response.new HTTParty.put(path, options, &block)
end