class Dependabot::Clients::Bitbucket
def post(url, body, content_type = "application/json")
def post(url, body, content_type = "application/json") headers = auth_header headers = if body.empty? headers.merge({ "Accept" => "application/json" }) else headers.merge({ "Content-Type" => content_type }) end response = Excon.post( url, body: body, user: credentials&.fetch("username", nil), password: credentials&.fetch("password", nil), idempotent: false, **SharedHelpers.excon_defaults( headers: headers ) ) raise Unauthorized if response.status == 401 raise Forbidden if response.status == 403 raise NotFound if response.status == 404 raise TimedOut if response.status == 555 response end