Closed efectn closed 1 month ago
The changes involve a substantial refactoring of the Client
struct and its methods, particularly in how proxy configurations are implemented. The proxyURL
field was removed, and the SetProxyURL
method now utilizes the fasthttpproxy
package for enhanced proxy handling. Additionally, the testing framework has been updated to reflect these changes, ensuring proper validation of proxy functionality during requests.
Files | Change Summary |
---|---|
client/client.go |
Removed proxyURL field from Client struct; updated SetProxyURL method to utilize fasthttpproxy for setting the proxy. |
client/client_test.go |
Modified Test_Client_SetProxyURL to implement a new proxy server using fasthttp ; updated tests to verify correct proxy behavior and response handling. |
sequenceDiagram
participant Client
participant Proxy
participant Server
Client->>Proxy: SetProxyURL(proxyURL)
Proxy-->>Client: Proxy set successfully
Client->>Proxy: Send request
Proxy->>Server: Forward request
Server-->>Proxy: Return response
Proxy-->>Client: Return response
Objective | Addressed | Explanation |
---|---|---|
Set proxy should be used when making requests (#3085) | ✅ | |
Proxy configuration should be properly validated | ❌ | No validation logic for proxy URL errors present. |
🐇 In the meadow where fibers play,
A proxy hops, brightening the day.
WithSetProxyURL
, swift and spry,
Now requests soar, like clouds in the sky!
Hooray for the changes, let’s leap and cheer,
For efficient proxies, our vision is clear! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.82%. Comparing base (
25e3992
) to head (841a100
). Report is 6 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Code looks good. @efectn can you fix the lint error
Nvm i will do it, its just one word change
@efectn something seems to be not thread safe
Description
Fixes https://github.com/gofiber/fiber/issues/3085
Changes introduced
Type of change
Checklist
Before you submit your pull request, please make sure you meet these requirements:
/docs/
directory for Fiber's documentation.Commit formatting
Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md