Sha256: 747559e59b61ef3f3681b7d1e4d26e57eb77b311cdb54c0f31114e89df3af8e6
Contents?: true
Size: 529 Bytes
Versions: 1
Compression:
Stored size: 529 Bytes
Contents
module ApontadorOauth2 class Request def self.send(options) conn = Faraday.new(:url => options[:url]) res = conn.get do |req| req.url(options[:path]) req.headers['Content-Type'] = "application/json" req.headers['Authorization'] = "Bearer #{options[:token]}" req.headers['Accept'] = "application/json" req.body = {:user => options[:user]}.to_json if options[:user] end res end def self.json(data) JSON.parse(data) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
apontador_oauth2-0.1.5 | lib/apontador_oauth2/request.rb |