Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should HTTP.request(::HTTP.Request) be defined? #1015

Open
anandijain opened this issue Feb 21, 2023 · 1 comment
Open

should HTTP.request(::HTTP.Request) be defined? #1015

anandijain opened this issue Feb 21, 2023 · 1 comment

Comments

@anandijain
Copy link

Anand Jain
1 hour ago
is there a reason that HTTP.request(::HTTP.Request) isn’t defined? (i know nothing about http)

Jacob Quinn
3 minutes ago
The only difficulty is that HTTP.request may make a few modifications to the HTTP.Request in the process; so maybe it would have to be HTTP.request! for clarity?

Jacob Quinn
2 minutes ago
Until recently, there was actually a decent amount of work done prior to making the actual HTTP.Request object, mainly due to just historical code bitrot. But w/ the 1.0 release, a lot of that was cleaned up and now it’s basically the first step when making a request, so much more doable now.

@jariji
Copy link

jariji commented Jul 6, 2023

HTTP.request may make a few modifications to the HTTP.Request in the process

It might be nice to have a functional-style API with immutable types

send :: Request -> SentRequest

or something like that. That way I can reuse the same request and transform it using Accessors.jl without having to think about what modifications request! would make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants