Categorygithub.com/jzero-io/restc
modulepackage
0.5.0
Repository: https://github.com/jzero-io/restc.git
Documentation: pkg.go.dev

# README

restc

rest client for calling apis

example

package main
import (
	"context"
	
	"github.com/jzero-io/restc"
)

func main() {
	restClient, err := restc.New(restc.WithUrl("http://127.0.0.1:8080"))
	if err != nil {
		panic(err)
	}

	result := restClient.Get().SubPath("/api/v1/version").Do(context.Background())
	if result.Error() != nil {
		panic(err)
	}
	println(result.Status())
}

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
Request allows for building up a request to a server in a chained fashion.
No description provided by the author
Result contains the result of calling Request.Do().

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author