diff --git a/lib/haste/uploader.rb b/lib/haste/uploader.rb index 0c857c7..6e1201d 100644 --- a/lib/haste/uploader.rb +++ b/lib/haste/uploader.rb @@ -1,5 +1,6 @@ require 'json' require 'faraday' +require 'uri' module Haste @@ -41,7 +42,9 @@ def upload_raw(data) private def do_post(data) - connection.post('/documents', data) + posturi= URI.parse(server_url) + posturi.path += '/documents' + connection.post(posturi.path, data) end def connection