result := Credential{}
client := httpclient.NewClient(
httpclient.WithSender(gosender.New(gosender.WithTimeout(time.Second * 5))),
)
statusCode, err := client.Post(context.Background(), "http://localhost:8080/login",
httpclient.WithBodyProvider(body.NewJson(Credential{
Username: "admin",
Password: "admin",
})),
httpclient.WithHookFn(hook.UnmarshalResponse(&result)),
httpclient.WithHookFn(hook.Log()),
)
-
Notifications
You must be signed in to change notification settings - Fork 0
Simple http client for go, easy to use
License
phamvinhdat/httpclient
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple http client for go, easy to use
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published