FIX: Allow 'api_username' to be changed.

FIX: Allow ‘api_username’ to be changed.

This was a regression when switching to header based auth. This fix allows you to change the ‘api_username’ for an initialized client so that you can use it for who you want posts or topics to be created as.

diff --git a/lib/discourse_api/client.rb b/lib/discourse_api/client.rb
index 89a6f18..e4d6fc2 100644
--- a/lib/discourse_api/client.rb
+++ b/lib/discourse_api/client.rb
@@ -59,7 +59,7 @@ module DiscourseApi
     def api_username=(api_username)
       @api_username = api_username
-      @connection.params['api_username'] = api_username unless @connection.nil?
+      @connection.headers['Api-username'] = api_username unless @connection.nil?
     def connection_options

GitHub sha: eee496af