Commit 3a124df

mokha <mokha@cisco.com>
2019-02-16 22:14:20
use scim content type in headers
1 parent 2cbaa80
Changed files (1)
lib
scim
lib/scim/kit/v2/configuration.rb
@@ -59,7 +59,7 @@ module Scim
         private
 
         def load_items(base_url, path, type, items)
-          response = client.get(URI.join(base_url, path))
+          response = client.get(URI.join(base_url, path), headers: headers)
           hashes = JSON.parse(response.body, symbolize_names: true)
           hashes.each do |hash|
             item = type.from(hash)
@@ -70,6 +70,13 @@ module Scim
         def client
           @client ||= Net::Hippie::Client.new
         end
+
+        def headers
+          {
+            'Accept' => 'application/scim+json',
+            'Content-Type' => 'application/scim+json',
+          }
+        end
       end
     end
   end