Documentation ¶
Index ¶
- type Sugar
- func (s *Sugar) Bytes() []byte
- func (s *Sugar) Close() *Sugar
- func (s *Sugar) Code() int
- func (s *Sugar) ContentType() string
- func (s *Sugar) Do() *Sugar
- func (s *Sugar) Error() error
- func (s *Sugar) OK() bool
- func (s *Sugar) Response() *http.Response
- func (s *Sugar) SaveToFile(fileName string) *Sugar
- func (s *Sugar) Scan(data interface{}) *Sugar
- func (s *Sugar) ScanJSON(userStruct interface{}) *Sugar
- func (s *Sugar) ScanXML(userStruct interface{}) *Sugar
- func (s *Sugar) ScanYAML(userStruct interface{}) *Sugar
- func (s *Sugar) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sugar ¶
type Sugar struct {
// contains filtered or unexported fields
}
Sugar response with status code and body data
func (*Sugar) ContentType ¶ added in v1.0.8
ContentType read response content type
func (*Sugar) SaveToFile ¶
SaveToFile allows you to download the contents of the response to a file. TODO test
func (*Sugar) ScanJSON ¶
ScanJSON is a method that will populate a struct that is provided `userStruct` with the JSON returned within the response body.
func (*Sugar) ScanXML ¶
ScanXML is a method that will populate a struct that is provided `userStruct` with the XML returned within the response body.
Click to show internal directories.
Click to hide internal directories.