restclient

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: MIT

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

Path Synopsis
_example
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL