From 0ea5e5c61cbad5a9cb991a76286fbde2e0c60079 Mon Sep 17 00:00:00 2001 From: vajain21 Date: Wed, 21 Jan 2015 14:59:06 +0530 Subject: [PATCH] Fix issue #26 --- lib/haste/uploader.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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