// Http get request
497371
func (request *AliyunRequest) DoGetRequest() (string, error) {
	resp, err := http.Get(request.Url)
	if err != nil {
		// handle error
		log.Error(err)
		return "", err
	}
	defer resp.Body.Close()
	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		// handle error
		log.Error(err)
		return "", err
	}
	result := string(body)
	var errResp ErrorResponse
	json.Unmarshal([]byte(result), &errResp)
	if errResp.Message != "" {
		err = &SdkError{errResp, request.Url}
	}
	return result, err
}
740874
func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, error) {
	return c.Request("GET", p, ro)
}
440983
func httpGetVolume(w http.ResponseWriter, r *http.Request, vars map[string]string) (interface{}, error) {
	log.Debugf("Received httpGetVolume: %+v", vars)

	key := vars["key"]

	collections.volumeMutex.Lock()
	defer collections.volumeMutex.Unlock()
	obj := collections.volumes[key]
	if obj == nil {
		log.Infof("volume %s not found", key)
		return nil, errors.New("volume not found")
	}

	// Return the obj
	return obj, nil
}
1052542
func getHost(r *http.Request) string {
	if r.Host != "" {
		return r.Host
	}

	return r.URL.Host
}
1043446
func (c Client) get(url string) (*http.Response, error) {
	return c.request("GET", url, nil)
}
798746
func (r *Route) Get(fn http.HandlerFunc) *Route {
	return r.Method(http.MethodGet, fn)
}
1079802
func GetHost(r *http.Request) string {
	h := r.URL.Host
	if h == "" {
		h = r.Host
	}
	return h
}
101149
func Get(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Cache-Control", "must-revalidate")
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("Access-Control-Allow-Origin", "*")
	w.Header().Set("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS")
	var col, id string
	if !Require(w, r, "col", &col) {
		return
	}
	if !Require(w, r, "id", &id) {
		return
	}
	docID, err := strconv.Atoi(id)
	if err != nil {
		http.Error(w, fmt.Sprintf("Invalid document ID '%v'.", id), 400)
		return
	}
	dbcol := HttpDB.Use(col)
	if dbcol == nil {
		http.Error(w, fmt.Sprintf("Collection '%s' does not exist.", col), 400)
		return
	}
	doc, err := dbcol.Read(docID)
	if doc == nil {
		http.Error(w, fmt.Sprintf("No such document ID %d.", docID), 404)
		return
	}
	resp, err := json.Marshal(doc)
	if err != nil {
		http.Error(w, fmt.Sprint(err), 500)
		return
	}
	w.Write(resp)
}
939261
func (s *Service) get(w http.ResponseWriter, r *http.Request, _ mux.Params) {
	key := []byte(r.URL.String())
	value, err := s.todos.Get(key)
	if err != nil {
		http.Error(w, err.Error(), 500)
	}
	w.Header().Set("Content-Type", "application/json")
	w.Write(value)
}
867294
func (c *FCGIClient) Get(p map[string]string) (resp *http.Response, err error) {

	p["REQUEST_METHOD"] = "GET"
	p["CONTENT_LENGTH"] = "0"

	return c.Request(p, nil)
}
1163546
func (api UsersAPI) Get(w http.ResponseWriter, r *http.Request) {
	respBody := User{Name: "John", Username: "Doe"}
	json.NewEncoder(w).Encode(&respBody)
	// uncomment below line to add header
	// w.Header().Set("key","value")
}
771997
func (c *Client) Get(url string) (*http.Response, error) {
	get := func(args ...interface{}) (*http.Response, error) {
		return c.HTTPClient.Get(args[0].(string))
	}

	resp, err := c.HTTPClient.Get(url)
	if err != nil {
		if c.ExponentialBackoff {
			return c.backoff(get, url)
		}
		return nil, err
	}

	if resp.StatusCode >= http.StatusInternalServerError && c.ExponentialBackoff {
		return c.backoff(get, url)
	}

	return resp, err
}
1131420
func (c *HTTPClient) Get(url string) (*http.Response, error) {
	var resp *http.Response
	breaker := c.breakerLookup(url)
	err := breaker.Call(func() error {
		aresp, err := c.Client.Get(url)
		resp = aresp
		return err
	}, c.timeout)
	return resp, err
}
395605
func (c *Client) Get(url string, header map[string]string) ([]byte, error) {
	req, err := c.newRequest("GET", url, header)
	if err != nil {
		return nil, err
	}

	resp, err := c.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	bytes, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}

	return bytes, nil
}
267539
func (c *Client) Get() *Request {
	return NewRequest(c.httpClient, c.base, "GET", c.version, c.authstring, c.userAgent)
}
580767
func (r *FastHttpRequest) Get(key int) (value interface{}, err error) {
	switch key {
	case revel.HTTP_SERVER_HEADER:
		value = r.GetHeader()
	case revel.HTTP_MULTIPART_FORM:
		value, err = r.GetMultipartForm()
	case revel.HTTP_QUERY:
		value = r.GetQuery()
	case revel.HTTP_FORM:
		value, err = r.GetForm()
	case revel.HTTP_REQUEST_URI:
		value = string(r.Original.RequestURI())
	case revel.HTTP_REMOTE_ADDR:
		value = r.Original.RemoteAddr().String()
	case revel.HTTP_METHOD:
		value = string(r.Original.Method())
	case revel.HTTP_PATH:
		value = string(r.Original.Path())
	case revel.HTTP_HOST:
		value = string(r.Original.Request.Host())
	case revel.HTTP_URL:
		if r.url == nil {
			r.url, _ = url.Parse(string(r.Original.Request.URI().FullURI()))
		}
		value = r.url
	case revel.HTTP_BODY:
		value = bytes.NewBuffer(r.Original.Request.Body())
	default:
		err = revel.ENGINE_UNKNOWN_GET
	}

	return
}
1136573
func (r *Req) Get(url string, v ...interface{}) (*Resp, error) {
	return r.Do("GET", url, v...)
}