Skip to content

pulcy/rest-kit

Repository files navigation

rest-kit

GoDoc Build Status

Simple REST client helper written in Go.

Usage

import (
    "net/url"
    "github.com/pulcy/rest-kit"
)

c := restkit.NewRestClient(baseURL)
var user UserType
q := url.Values{}
q.Set("id", "some-user-id")
if err := c.Request("GET", "/user", q, nil, &user); err != nil {
    panic("GET /user failed")
}
// Modify user ...
if err := c.Request("POST", "/user", nil, user, nil); err != nil {
    panic("POST /user failed")
}

About

Simple REST helper written in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published