Merge pull request #268 from korczis/rest-merge

Fix with_connection
Fix tests