lib/dor/services/client.rb in dor-services-client-1.5.1 vs lib/dor/services/client.rb in dor-services-client-1.6.0
- old
+ new
@@ -81,10 +81,15 @@
# @note when username & password are nil, this line is required else
# the Faraday instance will be passed an empty block, which
# causes the adapter not to be set. Thus, everything breaks.
conn.adapter Faraday.default_adapter
conn.basic_auth username, password if username && password
+ conn.headers[:user_agent] = user_agent
end
+ end
+
+ def user_agent
+ "dor-services-client #{Dor::Services::Client::VERSION}"
end
end
end
end