https://github.com/core-go/client
https://github.com/core-go/client
client http-client
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/core-go/client
- Owner: core-go
- Created: 2020-10-01T10:05:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-19T16:14:15.000Z (almost 2 years ago)
- Last Synced: 2025-01-10T04:15:06.986Z (6 months ago)
- Topics: client, http-client
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# client
- This library is used to communicate with other services by http## Installation
Please make sure to initialize a Go module before installing core-go/client:```shell
go get -u github.com/core-go/client
```Import:
```go
import "github.com/core-go/client"
```
## Features
### Initialize http client from config
- Initialize client for http
- Initialize client for https
### Log request, response at client
Support to turn on, turn off
- request
- response
- duration
- http response status code
- response content length### Benefits
- Do not need to re-compile the service, user can switch client from http to https
- Do not need to re-compile the service, user can turn on, turn off the log (request, response, duration, response content length...)
### Microservice Architect
### A typical micro service
When you zoom one micro service, the flow is as below
