func (r *Resource) Put(options ...interface{}) (*Resource, error) {
	if len(options) > 0 {
		r.Payload = r.SetPayload(options[0])
	}
	return r.do("PUT")
}
Performs a PUT request on given Resource.
Accepts interface{} as parameter, will be used as payload.
package gopencils
import (
	"bytes"
	"encoding/json"
	"errors"
	"io"
	"net/http"
	"net/url"
	"strconv"
)
var ErrCantUseAsQuery = errors.New("can't use options[0] as Query")
type Resource struct {
	Api         *ApiStruct
	Url         string
	id          string
	QueryValues url.Values
	Payload     io.Reader
	Headers     http.Header
	Response    interface{}
	Raw         *http.Response
}
func (r *Resource) Res(options ...interface{}) *Resource {
	if len(options) > 0 {
		var url string
		if len(r.Url) > 0 {
			url = r.Url + "/" + options[0].(string)
		} else {
			url = options[0].(string)
		}
		header := r.Headers
		if header == nil {
			header = http.Header{}
		}
		newR := &Resource{Url: url, Api: r.Api, Headers: header}
		if len(options) > 1 {
			newR.Response = options[1]
		}
		return newR
	}
	return r
}
func (r *Resource) Id(options ...interface{}) *Resource {
	if len(options) > 0 {
		id := ""
		switch v := options[0].(type) {
		default:
			id = v.(string)
		case int:
			id = strconv.Itoa(v)
		case int64:
			id = strconv.FormatInt(v, 10)
		}
		url := r.Url + "/" + id
		header := r.Headers
		if header == nil {
			header = http.Header{}
		}
		newR := &Resource{id: id, Url: url, Api: r.Api, Headers: header, Response: &r.Response}
		if len(options) > 1 {
			newR.Response = options[1]
		}
		return newR
	}
	return r
}
func (r *Resource) SetQuery(querystring map[string]string) *Resource {
	r.QueryValues = make(url.Values)
	for k, v := range querystring {
		r.QueryValues.Set(k, v)
	}
	return r
}
func (r *Resource) Get(options ...interface{}) (*Resource, error) {
	if len(options) > 0 {
		if qry, ok := options[0].(map[string]string); ok {
			r.SetQuery(qry)
		} else {
			return nil, ErrCantUseAsQuery
		}
	}
	return r.do("GET")
}
func (r *Resource) Head(options ...interface{}) (*Resource, error) {
	if len(options) > 0 {
		if qry, ok := options[0].(map[string]string); ok {
			r.SetQuery(qry)
		} else {
			return nil, ErrCantUseAsQuery
		}
	}
	return r.do("HEAD")
}