// GetRequestPostData invokes the Network method. Returns post data sent with
// the request. Returns an error when no data was sent with the request.
556700
func (d *domainClient) GetRequestPostData(ctx context.Context, args *GetRequestPostDataArgs) (reply *GetRequestPostDataReply, err error) {
	reply = new(GetRequestPostDataReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Network.getRequestPostData", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Network.getRequestPostData", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Network", Op: "GetRequestPostData", Err: err}
	}
	return
}
97021
func (c *Client) sendPostRequest(httpReq *http.Request, jReq *jsonRequest) {
	// Don't send the message if shutting down.
	select {
	case <-c.shutdown:
		jReq.responseChan <- &response{result: nil, err: ErrClientShutdown}
	default:
	}

	c.sendPostChan <- &sendPostDetails{
		jsonRequest: jReq,
		httpRequest: httpReq,
	}
}
322910
func (f *Request) Post(url string) *Request {
	f.Url(url).Method("POST")
	return f
}
591545
func (c *StaticAuthClientCreds) GetRequestMetadata(context.Context, ...string) (map[string]string, error) {
	return map[string]string{
		"username": c.Username,
		"password": c.Password,
	}, nil
}
242590
func (d *domainClient) RequestData(ctx context.Context, args *RequestDataArgs) (reply *RequestDataReply, err error) {
	reply = new(RequestDataReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "IndexedDB.requestData", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "IndexedDB.requestData", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "IndexedDB", Op: "RequestData", Err: err}
	}
	return
}
690619
func (fw *JSONRPC) getRequestBody(action string, info map[string]string, timeout int) ([]byte, error) {
	args := &JSONRPC_Args{
		User:    info["username"],
		MAC:     info["mac"],
		IP:      info["ip"],
		Role:    info["role"],
		Timeout: timeout,
	}
	body, err := json2.EncodeClientRequest(action, args)
	return body, err
}
800759
func (m *PubSubSubscription) GetData() ([]byte, error) {
	return base64.StdEncoding.DecodeString(m.Message.Data)
}
917443
func (p *Packet) GetUDPData() []byte {
	return p.ipHdr.Buffer[p.ipHdr.ipHeaderLen+UDPDataPos:]
}
332021
func getRequest(d logrus.Fields, key string) (req *http.Request, ok bool) {
	v, ok := d[key]
	if !ok {
		return nil, false
	}
	req, ok = v.(*http.Request)
	if !ok || req == nil {
		return nil, false
	}
	return req, true
}
710809
func (l *Client) Get(endpoint string, params url.Values, body interface{}, response, data interface{}) error {
	method := "GET"

	// get the formatted endpoint url
	path, err := l.PrepUrl(endpoint, params, false)
	if err != nil {
		return err
	}

	payload, err := prepRequestBody(body)
	if err != nil {
		return err
	}

	// build the request
	r, _ := http.NewRequest(method, path, payload)

	// execute the request
	err = l.Do(r, response, data)
	if err != nil {
		return err
	}

	return nil
}
206490
func (wxa *MiniProgram) fetchData(urlStr string, body interface{}) (response []byte, err error) {
	var accessToken string
	accessToken, err = wxa.GetAccessToken()
	if err != nil {
		return
	}
	urlStr = fmt.Sprintf(urlStr, accessToken)
	response, err = util.PostJSON(urlStr, body)
	return
}
1350490
func (r Resource) Post(request *restful.Request, response *restful.Response) {
	if resource, ok := r.Parent.(PostSupported); ok {
		context := r.Context.NewAPIContext()
		if resource.PostAuthRequired() {
			auth, err := context.Authentication(request)
			if err != nil || auth == nil {
				ErrorResponseHandler(request, response, err, NewErrorResponse(
					http.StatusUnauthorized,
					"Invalid accesstoken",
					"POST"))
				return
			}
		}

		ps := resource.Reads()
		if ps != nil {
			err := request.ReadEntity(&ps)
			if err != nil {
				ErrorResponseHandler(request, response, err, NewErrorResponse(
					http.StatusBadRequest,
					"Can't parse request data",
					"POST Data Validation"))
				return
			}

			err = resource.Validate(context, ps, request)
			if err != nil {
				ErrorResponseHandler(request, response, err, NewErrorResponse(
					http.StatusBadRequest,
					err,
					"POST Data Validation"))
				return
			}
		}

		resource.Post(context, ps, request, response)
		request.SetAttribute("context", context)
	}
}
976987
func GetData(attrs *RequestParams) (MetricsTree, error) {
	url := createQueryURL(attrs)
	logger.Debug("Request URL is ", url)

	mCfg, err := createMetricConfigurations(attrs)
	if err != nil {
		return nil, err
	}

	logger.Debug("Starting request to OpenTSDB: " + url)
	resp, err := http.Get(url)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	if resp.StatusCode != 200 {
		b, _ := ioutil.ReadAll(resp.Body)
		return nil, errors.New(fmt.Sprintf("Request to OpenTSDB failed with %s (%s)", resp.Status, string(b)))
	}
	logger.Debug("Finished request to OpenTSDB")

	logger.Debug("Starting to parse the response from OpenTSDB")
	started := time.Now()
	mt, e := parseResponse(resp.Body, mCfg)
	logger.Debug(fmt.Sprintf("Finished parsing the response from OpenTSDB in %s", time.Now().Sub(started)))

	return mt, e
}
426878
func (c *Client) sendRequest(req request) (*jh.ResponseData, error) {
	request := jh.RequestData{
		ReqValue:   req.reqValue,
		ReqHeaders: req.reqHeader,
		ReqReader:  req.reqReader,
		ReqLength:  req.reqLength,
	}
	if req.expectedStatus == 0 {
		req.expectedStatus = http.StatusOK
	}
	respData := jh.ResponseData{
		RespValue:      req.resp,
		RespHeaders:    req.respHeader,
		ExpectedStatus: []int{req.expectedStatus},
	}
	err := c.client.SendRequest(req.method, req.url, "", &request, &respData)
	return &respData, err
}
851138
func (c *Context) GetPostFormArray(key string) ([]string, bool) {
	req := c.Request
	if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil {
		if err != http.ErrNotMultipart {
			debugPrint("error on parse multipart form array: %v", err)
		}
	}
	if values := req.PostForm[key]; len(values) > 0 {
		return values, true
	}
	if req.MultipartForm != nil && req.MultipartForm.File != nil {
		if values := req.MultipartForm.Value[key]; len(values) > 0 {
			return values, true
		}
	}
	return []string{}, false
}
1126311
func (c *MutableTLSCreds) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {
	return nil, nil
}
216366
func (r *Request) Post(url string) (*Response, error) {
	return r.Execute(MethodPost, url)
}