Documentation
¶
Index ¶
- func CastArray(item interface{}) []interface{}
- func CastFloatToInt(item interface{}) int
- func CastFloatToInt64(item interface{}) uint64
- func CastMap(item interface{}) map[string]interface{}
- func CastString(item interface{}) string
- func TurnOffCertValidation()
- func TurnOnCertValidation()
- type HttpMethod
- type Restapi
- func New(method HttpMethod, name string, url string) *Restapi
- func NewDelete(name string, url string) *Restapi
- func NewGet(name string, url string) *Restapi
- func NewGetXML(name string, url string, parseresponse bool) *Restapi
- func NewPost(name string, url string) *Restapi
- func NewPut(name string, url string) *Restapi
- func (pRA *Restapi) DebugOff()
- func (pRA *Restapi) DebugOn()
- func (pRA *Restapi) Dump()
- func (pRA *Restapi) FetchTLSCert(url string) (*x509.Certificate, bool)
- func (pRA *Restapi) GetArrayValue(index int, key string) interface{}
- func (pRA *Restapi) GetArrayValueInt(index int, key string) int
- func (pRA *Restapi) GetArrayValueInt64(index int, key string) uint64
- func (pRA *Restapi) GetArrayValueString(index int, key string) string
- func (pRA *Restapi) GetLastStatusCode() int
- func (pRA *Restapi) GetName() string
- func (pRA *Restapi) GetResponseBody() string
- func (pRA *Restapi) GetUrl() string
- func (pRA *Restapi) GetValue(index string) interface{}
- func (pRA *Restapi) GetValueInt(index string) int
- func (pRA *Restapi) GetValueString(index string) string
- func (pRA *Restapi) HasInnerMap(name string)
- func (pRA *Restapi) HasInnerMapArray(name string, countname string)
- func (pRA *Restapi) JsonOnly()
- func (pRA *Restapi) SaveResponseBody(filename string, structname string, bstdout bool) bool
- func (pRA *Restapi) Send() bool
- func (pRA *Restapi) SetApiKey(ApiKey string)
- func (pRA *Restapi) SetBasicAccessToken(AccessToken string)
- func (pRA *Restapi) SetBearerAccessToken(AccessToken string)
- func (pRA *Restapi) SetPostJson(jsonstr string) bool
- func (pRA *Restapi) UseCert(certfile string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastFloatToInt ¶
func CastFloatToInt(item interface{}) int
func CastFloatToInt64 ¶
func CastFloatToInt64(item interface{}) uint64
func CastString ¶
func CastString(item interface{}) string
func TurnOffCertValidation ¶
func TurnOffCertValidation()
func TurnOnCertValidation ¶
func TurnOnCertValidation()
Types ¶
type Restapi ¶
type Restapi struct {
Method HttpMethod
RawData interface{} // used to contain the raw response msg mody
BodyString string
BodyBytes []byte
// contains filtered or unexported fields
}
func (*Restapi) FetchTLSCert ¶
func (pRA *Restapi) FetchTLSCert(url string) (*x509.Certificate, bool)
func (*Restapi) GetArrayValue ¶
func (*Restapi) GetArrayValueInt64 ¶
func (*Restapi) GetArrayValueString ¶
func (*Restapi) GetLastStatusCode ¶
func (*Restapi) GetResponseBody ¶
func (*Restapi) GetValueInt ¶
func (*Restapi) GetValueString ¶
func (*Restapi) HasInnerMap ¶
func (*Restapi) HasInnerMapArray ¶
func (*Restapi) SaveResponseBody ¶
func (*Restapi) SetBasicAccessToken ¶
func (*Restapi) SetBearerAccessToken ¶
func (*Restapi) SetPostJson ¶
Click to show internal directories.
Click to hide internal directories.