Class: Bamboo::Client::Http::Xml

Inherits:
Abstract
  • Object
show all
Defined in:
lib/bamboo-client/http/xml.rb

Defined Under Namespace

Classes: Doc

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from Bamboo::Client::Abstract

Instance Method Details

#post(path, data = {}) ⇒ Object

Doc



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/bamboo-client/http/xml.rb', line 43

def post(path, data = {})
  resp = RestClient.post(uri_for(path), data) do |response, request, result, &block|
    if [301, 302, 307].include? response.code
      response.follow_redirection(request, result, &block)
    else
      response.return!(request, result, &block)
    end
  end

  Doc.from resp
end