Class: FcEnrich::HttpClient
- Inherits:
-
Object
- Object
- FcEnrich::HttpClient
- Defined in:
- lib/fc_enrich/http_client.rb
Instance Method Summary collapse
Instance Method Details
#post(path, payload_hash) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/fc_enrich/http_client.rb', line 6 def post(path, payload_hash) response = RestClient.post("https://api.fullcontact.com#{path}", MultiJson.encode(payload_hash), authorization: "Bearer #{FcEnrich.api_key}") MultiJson.decode(response.body) rescue RestClient::NotFound nil end |