Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 25, 2026

Implementation Plan for CFHTTP Proxy Settings Support

  • Add proxy properties to HyperRequest.cfc
    • Add proxyServer property (string)
    • Add proxyPort property (numeric, default 80)
    • Add proxyUser property (string)
    • Add proxyPassword property (string)
  • Add throughProxy() method to HyperRequest.cfc
    • Accept required string proxyHost, optional numeric proxyPort (default 80), optional string proxyUser (default ""), optional string proxyPassword (default "")
    • Return this for fluent interface
  • Update getMemento() method to include proxy settings
    • Add proxy key with struct containing all four properties
  • Update clone() method to copy proxy settings
  • Update CfhttpHttpClient.cfc
    • Add proxy settings to makeCFHTTPRequest() method
    • Add proxy settings to debug() method
  • Add comprehensive tests
    • Unit tests for throughProxy() method with authentication
    • Unit tests for throughProxy() method without authentication
    • Unit tests for throughProxy() method with custom port but no auth
    • Unit tests for memento including proxy
    • Unit tests for cloning with proxy settings
    • Integration test for debug output with proxy
  • Address code review feedback
    • Fix proxy port handling to avoid using len() on numeric value
    • Remove trailing whitespace for code style consistency
    • Make proxyUser and proxyPassword optional parameters
    • Update JSDoc comments to reflect optional parameters
  • Final validation and security check complete

Summary

All requirements have been successfully implemented:

  • ✅ Proxy settings can be configured via throughProxy() method
  • ✅ User and password are now optional (not all proxies require auth)
  • ✅ Parameter order follows best practices (required first, then optional)
  • ✅ Documentation updated to reflect optional parameters
  • ✅ Proxy settings appear in memento as a proxy key with struct
  • ✅ Proxy settings visible in CFHTTP debug info
  • ✅ Proxy settings copied when request is cloned
  • ✅ Comprehensive tests added including scenarios without authentication
  • ✅ Code review feedback addressed
  • ✅ Security check passed
Original prompt

This section details on the original issue you should resolve

<issue_title>Support CFHTTP proxy settings</issue_title>
<issue_description>I did a little digging, but I couldn’t find a way, with Hyper, to pass in proxy arguments - I think Lucee, ACF, and Boxing all support them on CFHTTP.

Basically, would like to be able to configure Hyper with proxyserver, proxyport, proxyuser, and proxypassword.</issue_description>

<agent_instructions>These are all optional properties. They should be set via a single .throughProxy( required string proxyHost, required string proxyUser, required string proxyPassword, numeric proxyPort = 80 ) method. These properties should be seen in the memento as a proxy key and struct with all four properties above. It should also be seen in the CFHTTP debug info. These properties should be copied when the request is cloned. Add tests for passing these keys.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot and others added 5 commits January 25, 2026 18:31
Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CFHTTP proxy settings configuration for Hyper Add proxy support via throughProxy() method Jan 25, 2026
Copilot AI requested a review from elpete January 25, 2026 18:38
Copy link
Collaborator

@elpete elpete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Fix the comment in HyperRequest then resubmit

Reordered throughProxy() parameters so optional ones come after required:
- proxyHost (required)
- proxyPort (optional, default 80)
- proxyUser (optional, default "")
- proxyPassword (optional, default "")

Added tests for proxy without authentication scenarios.

Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Updated the documentation for proxyUser and proxyPassword to indicate they default to empty string, making it clear these parameters are optional.

Co-authored-by: elpete <2583646+elpete@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 25, 2026

@copilot Fix the comment in HyperRequest then resubmit

Fixed the JSDoc comment to indicate that proxyUser and proxyPassword default to empty string. Commit: e47f2bc

Copilot AI requested a review from elpete January 25, 2026 18:48
@elpete elpete marked this pull request as ready for review January 25, 2026 18:54
@elpete elpete merged commit 37bec4c into main Jan 25, 2026
1 check passed
@elpete elpete deleted the copilot/support-cfhttp-proxy-settings branch January 25, 2026 18:55
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

Successfully merging this pull request may close these issues.

Support CFHTTP proxy settings

2 participants