Skip to content

feat(client): add http support#74

Open
zhangyongding wants to merge 1 commit intoovh:mainfrom
zhangyongding:add-http-support
Open

feat(client): add http support#74
zhangyongding wants to merge 1 commit intoovh:mainfrom
zhangyongding:add-http-support

Conversation

@zhangyongding
Copy link
Copy Markdown
Contributor

Complete this issue: Add HTTP support to kmip client

@zhangyongding zhangyongding requested a review from a team as a code owner November 3, 2025 03:42
add ReadHeaderTimeout
@phsym
Copy link
Copy Markdown
Collaborator

phsym commented Dec 12, 2025

Hi @zhangyongding thanks for this. HTTP client is definitely a good improvement.
I would however prefer avoiding mixing both tcp and http client together in the same client struct.

Maybe a cleaner approach would be to hide transport specific implementation behind an interface that would be used the the Client.conn field, or define an interface over the Client struct and implement it in a dedicated HTTPClient struct. What do you think ?

@zhangyongding
Copy link
Copy Markdown
Contributor Author

I think your idea is great.

@ldesauw
Copy link
Copy Markdown
Contributor

ldesauw commented Dec 15, 2025

I'm currently working on making the client an interface to allow having specific roundtriper (in your case an http one).
It's not finished yet but I will submit this week.

@zhangyongding
Copy link
Copy Markdown
Contributor Author

How is the progress now?

@ldesauw
Copy link
Copy Markdown
Contributor

ldesauw commented Jan 19, 2026

#80 added the possibility to precise a custom dialer that will be called.
You can therefore use an http dialer.
An example of implementation is available with the cluster dialer.

Would that be okay for you to define an http dialer using this interface ? Or is there missing pieces ?

@zhangyongding
Copy link
Copy Markdown
Contributor Author

Can you provide a verified example?

@ldesauw
Copy link
Copy Markdown
Contributor

ldesauw commented Jan 20, 2026

@zhangyongding
Copy link
Copy Markdown
Contributor Author

https://github.com/ovh/kmip-go/blob/main/kmipclient/dialer_cluster_test.go#L17

Here are all examples using TCP, with no examples using HTTP

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.

3 participants