From 98c8872e8501825bef3486c76f75e7530f9a6b98 Mon Sep 17 00:00:00 2001 From: Rohan Raj Date: Tue, 8 Mar 2022 07:37:08 +0530 Subject: [PATCH] chore: update readme --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8356ae0..c529bf8 100644 --- a/README.md +++ b/README.md @@ -1 +1,40 @@ -# httpclient \ No newline at end of file +# 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/) \ No newline at end of file