Giter VIP home page Giter VIP logo

Comments (7)

0x00002a avatar 0x00002a commented on August 21, 2024 1

iirc curl does not provide any way of checking whether redirects were followed, it just provides the FOLLOW_LOCATION option. My main use case for malloy client-side is replacing C style curl code. Like you said, theres nothing stopping the user from inspecting the response's result, finding its a redirect and doing the logic themselves if they want that level of control

from malloy.

Tectu avatar Tectu commented on August 21, 2024

@0x00002a do you see any scenario that would justify implementing this in a way that a user can inspect whether one or more redirects were followed or should this just happen completely transparent to the user?

One such use case I'd see is when implementing something like a RestAPI testing tool (eg. something like Postman or Insomnia). However, with an application that requires such a level of control a developer is likely to implement redirect following as a custom feature anyway, eg. to compile a timeline.

Thoughts?

from malloy.

Tectu avatar Tectu commented on August 21, 2024

@0x00002a how busy are you currently? I'd really like to move to the first release ASAP to make maintaining applications consuming this library easier and hopefully also attracting more users & contributors.

Do you feel like giving this a go?

from malloy.

0x00002a avatar 0x00002a commented on August 21, 2024

This is proving non-trivial. In the case of http redirects that go to a different host, we are going to have to parse the url provided to actually get that host so we can pass it to the resolver. I'm not sure if I should try writing code to do this, since anything I do write is going to be quite naive and certainly not cover all cases. I can implement this partially (without support for redirects to a different host) though.

Really I think malloy might need to depend on a url library for this sort of thing.

Thoughts?

from malloy.

Tectu avatar Tectu commented on August 21, 2024

Yeah, I have been looking at this for a while now. It didn't even have an alpha release when I started writing this library. That's why I added my own quick'n'dirty uri class (remember that one, eh?).

Do you know of any decent alternatives?

from malloy.

0x00002a avatar 0x00002a commented on August 21, 2024

None that I've used. I too like the look of Boost.URL, but as far as I can tell it is in no way ready for use yet. this (github repo) looks pretty nice and is something I was investigating for my own code, but I haven't actually used it.

from malloy.

Tectu avatar Tectu commented on August 21, 2024

I think we should aim for not including this in the initial v0.1 release given the complexity / nature of intrusive changes if we implement it properly.

from malloy.

Related Issues (20)

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.