Skip to content

Conversation

saada
Copy link
Contributor

@saada saada commented Aug 14, 2025

Summary

This PR adds four enhancements to the SSE client that improve flexibility while maintaining backward compatibility:

  • POST/PUT request support: Enables HTTP methods beyond GET with optional JSON payload support
  • Proxy authentication fix: Corrects proxy parameter names to use proxy_username/proxy_password instead of proxy_user/proxy_pass
  • Optional parsing mode: Adds ability to bypass SSE parsing for raw data streaming use cases
  • Optional SSL verification override: Allows disabling SSL verification for development/testing (secure by default)

Changes

POST/PUT Request Support

  • Added http_method parameter (defaults to "GET")
  • Added http_payload parameter for JSON payloads
  • Updated request logic to use specified method and payload

Proxy Authentication Fix

  • Fixed proxy option parameter names to match expected format
  • Changed from proxy_user/proxy_pass to proxy_username/proxy_password

Optional Parsing Mode

  • Added parse parameter (defaults to true)
  • When disabled, bypasses SSE parsing and returns raw chunks as events
  • Implemented via new BasicEventParser class

SSL Verification Override

  • Added verify_ssl parameter (defaults to true for security)
  • When set to false, disables SSL certificate verification
  • Useful for development, testing, and internal networks with self-signed certificates

Test plan

  • All existing tests pass
  • Backward compatibility maintained (all defaults preserve existing behavior)
  • Security maintained by default (SSL verification enabled unless explicitly disabled)
  • New features tested with existing test suite

Compatibility

All changes are backward compatible - existing code will continue to work exactly as before since all new parameters have sensible defaults that maintain current behavior and security posture.

- Add support for POST/PUT HTTP methods with JSON payload
- Fix proxy authentication parameter names (proxy_username/proxy_password)
- Add optional parsing mode to bypass SSE parsing for raw data streaming

These changes enable more flexible usage patterns while maintaining
backward compatibility with existing GET-only SSE implementations.
@saada saada requested a review from a team as a code owner August 14, 2025 17:06
@saada saada changed the title Add POST/PUT request support and optional parsing features feat: Add POST/PUT request support and optional parsing features Aug 14, 2025
Add verify_ssl parameter (defaults to true) to allow disabling SSL
certificate verification for development, testing, and internal networks.
This maintains security by default while providing flexibility when needed.
@keelerm84
Copy link
Member

Hey @saada I am working through the other PR first, and then we can come back to take a look at the remaining changes here. Thank you for your patience!

@keelerm84
Copy link
Member

@saada Thanks for your patience as we wrap up this work.

Most items have been addressed in separate PRs for individual review and are pending release.

Two remaining items:

OpenSSL change: #68 adds support for passing base HTTP options, which should eliminate the need for an explicit constructor option.

Parse option: Could you clarify your use case? If you need "raw streaming," what value does this library provide in that scenario over just connecting and streaming the data directly?

@keelerm84
Copy link
Member

I went ahead and cut a release with the current functionality. If you can let me know about those questions, we can work to address those. In the meantime, hope the other stuff works well for you!

@keelerm84 keelerm84 added the waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness. label Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for feedback Indicates LaunchDarkly is waiting for customer feedback before issue is closed due to staleness.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants