Sha256: 6442ccb4caa687e22cf1fad6417b316d01d8d39936a6a57865910c4cac0f12e3
Contents?: true
Size: 499 Bytes
Versions: 20
Compression:
Stored size: 499 Bytes
Contents
module BacklogKit class Response class Middleware < Faraday::Response::Middleware attr_reader(:headers, :status, :body) def on_complete(env) @headers = env.response_headers @status = env.status @body = env.body end private def no_content? status == 204 end def json? !!content_type.match(/application\/json/) end def content_type headers['content-type'] end end end end
Version data entries
20 entries across 20 versions & 1 rubygems