Closed haolian9 closed 4 years ago
Leading slash for path required, which in fairness is stupid. I've just changed this on master, using urljoin
. Thanks!
See: https://github.com/theelous3/asks/commit/795437e85c49256a8766a31dd4689a6a1c02d115
Hello there, I don't think that the new behavior is expected, e.g.
>>> urljoin('http://echo.jsontest.com/asks/test', '/1')
'http://echo.jsontest.com/1'
As a new user of this library, personally I find the previous behavior better: it's not smart, but it's consistent since it's just concatenating parts of the URL together.
@McSinyx whew yeah, I was in a rush there, thanks for catch.
I spent some time on this today and more completely tackled the issue: https://github.com/theelous3/asks/pull/176
Thanks, I didn't read the implementation but the tested behavior does what I want!
As current implementation, the
path
param ofSession.request()
actually should always be absolute path, otherwise, it errs.I do not see this limit in func.__doc__, should we add some defence or just document it out?