Documentation ¶
Overview ¶
this package contains modified code based on following github repo: https://github.com/jaredwilkening/httpclient
Index ¶
- func Delete(url string, header Header, user *Auth) (resp *http.Response, err error)
- func Do(t string, url string, header Header, data io.Reader, user *Auth) (*http.Response, error)
- func DoTimeout(t string, url string, header Header, data io.Reader, user *Auth, ...) (*http.Response, error)
- func Get(url string, header Header, user *Auth) (resp *http.Response, err error)
- func GetTimeout(url string, header Header, user *Auth, ReadWriteTimeout time.Duration) (resp *http.Response, err error)
- func Post(url string, header Header, data io.Reader, user *Auth) (resp *http.Response, err error)
- func Put(url string, header Header, data io.Reader, user *Auth) (resp *http.Response, err error)
- type Auth
- type Form
- type Header
- type PageItem
- type RestClient
- func (rc *RestClient) Delete(url string) (jsonstream []byte, err error)
- func (rc *RestClient) Get(url string) (jsonstream []byte, err error)
- func (rc *RestClient) InitPagination(url string, pageName string, offsetName string)
- func (rc *RestClient) Next() (item *PageItem, err error)
- func (rc *RestClient) Post(url string, data io.Reader) (jsonstream []byte, err error)
- func (rc *RestClient) Put(url string, data io.Reader) (jsonstream []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeout ¶
Types ¶
type Auth ¶
func GetUserByBasicAuth ¶
func GetUserByTokenAuth ¶
support multiple token types with datatoken backwards compatable, if no type given default to OAuth
type Form ¶
type RestClient ¶
func (*RestClient) InitPagination ¶
func (rc *RestClient) InitPagination(url string, pageName string, offsetName string)
func (*RestClient) Next ¶
func (rc *RestClient) Next() (item *PageItem, err error)
if error is io.EOF, than no more items left
Click to show internal directories.
Click to hide internal directories.