-
Notifications
You must be signed in to change notification settings - Fork 129
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
feat(client): Implement RawRequestBuilder
for raw HTTP requests
#257
Conversation
f2131c8
to
a4f9545
Compare
Thanks for taking this on, and sorry it ended up landing right in the middle of the hyper 1.0 change 😅 |
a4f9545
to
c31425a
Compare
Thanks for the update and suggestions! I appreciate your work on fantoccini lib. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent — just a few more tweaks now and I think we're there!
- Introduce `RawRequestBuilder` struct with optional cookie handling. - Add methods to set HTTP method, URL, optional cookie URL, and request modification. - Fix cookie handling by ensuring navigation to the target domain before sending the request.
- Join `current URL` with the `cookie_url` - Set default value of `cookie_url` to `"/please_give_me_your_cookies"` - Add option to `opt out` of the cookie navigation process - Move `get_ua` outside the conditional block
94ca205
to
5423b75
Compare
It's actually better if you don't force-push while we're still iterating, since the force pushes make it much harder to track exactly what's changed since last time I looked. We can clean up the history at the very end :) |
Sure, I'll avoid that. Forgot to |
I made a change so that the various methods are now available for all |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
Released in 0.21.2 🎉 |
Closes #148
This PR introduces a
RawRequestBuilder
struct to handle raw HTTP requests with optional cookie handling.Builder Pattern Implementation:
RawRequestBuilder
for setting HTTP method(method)
, URL(url)
, optional cookie URL(cookie_url)
, request modification function(map_request)
, and sending the request(send)
.raw_request
method to the Client struct to initialize theRawRequestBuilder
.