-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e160cc
commit 98c8872
Showing
1 changed file
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,40 @@ | ||
# httpclient | ||
# httpclient | ||
|
||
http request client with in build request and response logging. | ||
|
||
## Integration | ||
|
||
either you can import default config and edit it out according to your needs or you can use `Config` struct to create your own config. for example: | ||
|
||
``` | ||
// passing the config as nil. | ||
// internally http client uses | ||
// default config | ||
client, err := httpclient.New() | ||
if err != nil { | ||
log.Println(err) | ||
} | ||
``` | ||
|
||
or | ||
|
||
``` | ||
// initialize the config | ||
hConfig := httpclient.Config{ | ||
Timeout: 10 * time.Second, | ||
} | ||
// passing the http config while creating new http client | ||
client, err := httpclient.New(hConfig...) | ||
if err != nil { | ||
log.Println(err) | ||
} | ||
``` | ||
|
||
then you can use this client inside your code. | ||
|
||
## Example | ||
|
||
below are the examples which gonna help you to get started with the the integration. | ||
|
||
[example](example/) |