Comments (7)
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.
@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.
@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.
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.
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.
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.
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)
- Usage of start() HOT 9
- Client: SNI hostname on WSS connection
- HTTP: More centralized configuration
- Connection timeout configuration
- Cross-Platform Way to Get Root Certs From Store? HOT 4
- server::listener: provide method for catching binding errors
- HTML form: check for requires fields HOT 2
- HTTP server: Add cache control HOT 1
- HTML form: populate() potentially dangerous HOT 1
- Custom HTTP response generator
- controller i/o threads reservation
- Form parsing should honor Content-Type
- Deprecate HTML namespace
- Generator response types HOT 1
- CMake: Check Windows 11 implementation for get_WIN32_WINNT
- HTTP Client: Allow connection re-use
- Potential issue in session cookie handling
- HTTP: Improve cookie handling
- HTTP connection detector: Different logging styles
- Consider using Botan for host certificate store access HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from malloy.