class Curl::Easy

Attributes

_oa_header_str[RW]
_oa_http_params[RW]
_oa_http_verb[RW]
_oa_instrumented[RW]
_oa_original_on_complete[RW]
_oa_original_on_header[RW]
_oa_serial[RW]

Public Instance Methods

header_str()
Also aliased as: header_str_without_oneapm
header_str_with_oneapm() click to toggle source

We override this method in order to ensure access to header_str even though we use an on_header callback

# File lib/one_apm/inst/http_clients/curb.rb, line 77
def header_str_with_oneapm
  if self._oa_serial
    self._oa_header_str
  else
    # Since we didn't install a header callback for a non-serial request,
    # just fall back to the original implementation.
    header_str_without_oneapm
  end
end
Also aliased as: header_str
header_str_without_oneapm()
Alias for: header_str
http( verb )
Also aliased as: http_without_oneapm
Alias for: http_with_oneapm
http_head(*args, &blk)
Also aliased as: http_head_without_oneapm
http_head_with_oneapm(*args, &blk) click to toggle source

We have to hook these three methods separately, as they don't use Curl::Easy#http

# File lib/one_apm/inst/http_clients/curb.rb, line 32
def http_head_with_oneapm(*args, &blk)
  self._oa_http_verb = :HEAD
  http_head_without_oneapm(*args, &blk)
end
Also aliased as: http_head
http_head_without_oneapm(*args, &blk)
Alias for: http_head
http_post(*args, &blk)
Also aliased as: http_post_without_oneapm
http_post_with_oneapm(*args, &blk) click to toggle source
# File lib/one_apm/inst/http_clients/curb.rb, line 39
def http_post_with_oneapm(*args, &blk)
  self._oa_http_verb = :POST
  self._oa_http_params = args.first
  http_post_without_oneapm(*args, &blk)
end
Also aliased as: http_post
http_post_without_oneapm(*args, &blk)
Alias for: http_post
http_put(*args, &blk)
Also aliased as: http_put_without_oneapm
http_put_with_oneapm(*args, &blk) click to toggle source
# File lib/one_apm/inst/http_clients/curb.rb, line 47
def http_put_with_oneapm(*args, &blk)
  self._oa_http_verb = :PUT
  self._oa_http_params = args.first
  http_put_without_oneapm(*args, &blk)
end
Also aliased as: http_put
http_put_without_oneapm(*args, &blk)
Alias for: http_put
http_with_oneapm( verb ) click to toggle source

Hook the http method to set the verb.

# File lib/one_apm/inst/http_clients/curb.rb, line 57
def http_with_oneapm( verb )
  self._oa_http_verb = verb.to_s.upcase
  http_without_oneapm( verb )
end
Also aliased as: http
http_without_oneapm( verb )
Alias for: http
perform()
Also aliased as: perform_without_oneapm
Alias for: perform_with_oneapm
perform_with_oneapm() click to toggle source

Hook the perform method to mark the request as non-parallel.

# File lib/one_apm/inst/http_clients/curb.rb, line 67
def perform_with_oneapm
  self._oa_serial = true
  perform_without_oneapm
end
Also aliased as: perform
perform_without_oneapm()
Alias for: perform