Class: Abrupt::Service::AbsoluteUrl

Inherits:
Base show all
Defined in:
lib/abrupt/service/absolute_url.rb

Overview

Complexity service documentation see ‘wba.cs.hs-rm.de/AbRUPt/service/absoluteurl/’

Constant Summary collapse

SERVICE_URI =

TODO: outsource service uri to module Service

'http://wba.cs.hs-rm.de/AbRUPt/service/absoluteurl/'

Instance Attribute Summary

Attributes inherited from Base

#abbr, #options, #response, #url

Instance Method Summary collapse

Methods inherited from Base

available_options, #initialize, keyname, transform_hash

Constructor Details

This class inherits a constructor from Abrupt::Service::Base

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/abrupt/service/absolute_url.rb', line 14

def execute
  options = {
      method: :post,
      timeout: 6000,
      open_timeout: 6000,
      accept: :html
  }
  options.merge!(url: @url, payload: @html)
  begin
    RestClient::Request.execute(options).to_str
  rescue => e
    puts "some problems with #{@url}"
    puts e
    nil
  end
end

#service_uriObject



10
11
12
# File 'lib/abrupt/service/absolute_url.rb', line 10

def service_uri
  SERVICE_URI
end