Git Product home page Git Product logo

Comments (6)

MicaelJarniac avatar MicaelJarniac commented on June 29, 2024

That's quite interesting, I'll surely give it a look.

Most of the time I've come across URLs with trailing slashes, keeping or removing them made no difference, so I thought it generally meant the same thing.

Thanks for the suggestion!

from buildurl.

icaine avatar icaine commented on June 29, 2024

It depends on a convention;) E.g. Django has trailing slash convention and redirects urls without TS to the ones with TS. But only if it's enabled in config and when it's not, the request will result in 404.

from buildurl.

MicaelJarniac avatar MicaelJarniac commented on June 29, 2024

I've added this feature. While working on it, I considered also adding support for more than one slash separating path elements, like https://example.com/one//two/, but it seems to be even less common, and to do that I'd have to rework a bunch of the logic for handling the path.

Thanks again for the idea!

Would you like to be added to the All Contributors list?

from buildurl.

icaine avatar icaine commented on June 29, 2024

Thank you very much and no contribution is needed:)

Although two slashes are valid in url i've never seen anyone using it on purpose but we never know:)

I have few more usability suggestions so i will create few more tickets if you dont mind:)
Or you can inspire here on your own. It's a php library but the way how one can work with urls is something that i really miss in python. I rewrote it to python once but never published because it depends on Django and i was lazy to write tests for it:) If you want you can check the code here and use it as you please.

from buildurl.

MicaelJarniac avatar MicaelJarniac commented on June 29, 2024

I'll take a look at those, thanks again!

Oh, and you might want to take a look at furl, it's pretty similar to BuildURL, but more well-known, and might be more complete.

When I created BuildURL, it was actually inside another project, but it grew a bit and I split it to its own project, but back then I didn't know furl existed.

Only recently have I come across it, and I almost gave up on BuildURL, but this is my first-ish open-source project, and I really like it, so I'll keep it around and keep improving it.

I'm yet to write some better documentation, but I'll likely reference furl there so people can take a look at that too and choose which one they want to use.

from buildurl.

icaine avatar icaine commented on June 29, 2024

Hehe, furl - i have totally forgotten about the library. I was using it few years ago but i have a feeling that there had been something i didn't like about it. And when i was searching for some url library recently, it didn't appear in results while your did:) But thanks for the reminder:)

from buildurl.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.