module
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: May 19, 2024
License: MIT
Opens a new window with license information.
README
¶
restclient
Package restclient
implements a http.Client
and make http on behalf of http.Client
to their respective Server.
###Install
With a correctly configured Go toolchain:
go get github.com/codagelabs/restclient
###Examples
func main() {
type Resp struct {
}
var url = ""
resp := Resp{}
var status int
err := request.NewRestClient(&http.Client{}).NewRequest().GetResponseAs(&resp).GetResponseStatusCodeAs(&status).GET(url)
if err != nil {
fmt.Println(err)
}
fmt.Println(resp)
fmt.Println(status)
}
Directories
¶
_example
|
|
|
|
|
|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
|
Click to show internal directories.
Click to hide internal directories.