func (r *Request) Do() (Value, error) {
	req, err := http.NewRequest(
		r.httpMethod,
		fmt.Sprintf(
			"https://api.stackexchange.com%s?%s",
			r.method,
			r.params.Encode(),
		),
		nil,
	)
	if err != nil {
		return nil, err
	}
	req.Header.Set("User-Agent", "go-seapi")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, err
	}
	v := make(Value)
	if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
		return nil, err
	}
	if errMsg := v.String("error_message"); len(errMsg) != 0 {
		return nil, errors.New(errMsg)
	}
	return v, nil
}
// Do executes the request and returns the response as a Value if successful.
Do executes the request and returns the response as a Value if successful.
// Do executes the request and returns the response as a Value if successful .
func (r *Request) Do() (Value, error) {
	req, err := http.NewRequest(
		r.httpMethod,
		fmt.Sprintf(
			"https://api.stackexchange.com%s?%s",
			r.method,
			r.params.Encode(),
		),
		nil,
	)
	if err != nil {
		return nil, err
	}
	req.Header.Set("User-Agent", "go-seapi")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, err
	}
	v := make(Value)
	if err := json.NewDecoder(res.Body).Decode(&v); err != nil {
		return nil, err
	}
	if errMsg := v.String("error_message"); len(errMsg) != 0 {
		return nil, errors.New(errMsg)
	}
	return v, nil
}
func ( r * Request ) Do ( ) ( Value , error ) { req , err := http . NewRequest ( r . httpMethod , fmt . Sprintf ( " " , r . method , r . params . Encode ( ) , ) , nil , ) if err != nil { return nil , err } req . Header . Set ( " " , " " ) res , err := http . DefaultClient . Do ( req ) if err != nil { return nil , err } v := make ( Value ) if err := json . NewDecoder ( res . Body ) . Decode ( & v ) ; err != nil { return nil , err } if errMsg := v . String ( " " ) ; len ( errMsg ) != 0 { return nil , errors . New ( errMsg ) } return v , nil }
Do executes the request and returns the response as a Value if successful.
Do executes the request and returns the response as a Value if successful .