nandlabs / go-commons

A common collection of utilities for Go programming language
Apache License 2.0
2 stars 2 forks source link

Create a HTTP Client interface tailored for REST APIs #7

Closed nandagopalan closed 1 year ago

nandagopalan commented 1 year ago

Need a new HTTP Client interface that encapsulates all operations for the REST API such as

  1. Authentication
  1. Codec/Data Transformation
  2. SSL and External certificate/key store usage
  3. Retries
  4. Circuit Breaker implementation
  5. HTTP redirect follows with limits
  6. Reusing and Caching of clients
  7. Error Handling
neo7337 commented 1 year ago

@nandagopalan do we want to write our own client or build a wrapper on the default net/http client implementation?

nandagopalan commented 1 year ago

Initial version with the following support has been added and merged to main https://github.com/nandlabs/go-commons/pull/15

  1. Codec Data Transformation
  2. Retries
  3. Circuit Breaker
  4. Caching of clients (default http.Client Caching leveraged)
nandagopalan commented 1 year ago

https://github.com/nandlabs/go-commons/pull/15 issues resolved in the subsequent https://github.com/nandlabs/go-commons/pull/16

nandagopalan commented 1 year ago

Remaining features covered in https://github.com/nandlabs/go-commons/issues/20 https://github.com/nandlabs/go-commons/issues/21