Ecwid / consul-api

Java client for Consul HTTP API
Apache License 2.0
416 stars 177 forks source link

AgentConsulClient.agentServiceRegister use wrong content-type #241

Open FunnyYish opened 1 year ago

FunnyYish commented 1 year ago

AgentConsulClient.agentServiceRegister send a http request with json body,but the content-type is text/plain; charset=UTF-8 rather than application/json

LimingSong-BJ commented 1 year ago

Thank you for your question. From the code, it does seem that the program uses the Httpclient default MimeType, which we can change to application / json. But I have a better idea, why can't we take this opportunity to change Httpclient to Retrofit?