ensure a path is set on url when making http request, fix #172