Skip to content

Consider expanding the HttpClient to support a query parameter and fragment builders. #753

@flyinprogrammer

Description

@flyinprogrammer

Today we make it super easy to create an HttpClient with headers that are set, or even conditionally set, for the lifetime of the HttpClient - which is super cool!

https://github.com/reactor/reactor-netty/blob/master/src/main/java/reactor/netty/http/client/HttpClient.java#L611-L624

However, there are cases where APIs use query parameters to achieve clever things. For example, (and I acknowledge this is weak) the Consul API allows (and now discourages) the use of an API security token to be passed to Consul via URI Query Parameter. Today, in order to support this we must use a delegate pattern and override the uri methods of an HttpClient class to inject the token.

If we had helper builder functions on the client, similar to the ones we have for headers, the delegate would be unnecessary.

Similarly a URI Fragment builder could also be added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions