// ResponseBody returns the body as a byte array
348095
func ResponseBody(res *http.Response) ([]byte, error) {
	defer res.Body.Close()
	contents, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return []byte{}, err
	}
	return contents, nil
}
116372
func NewResponse(body []byte, headers http.Header) *Response {
	return &Response{body: body, Headers: headers}
}
445208
func (d *domainClient) SearchInResponseBody(ctx context.Context, args *SearchInResponseBodyArgs) (reply *SearchInResponseBodyReply, err error) {
	reply = new(SearchInResponseBodyReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Network.searchInResponseBody", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Network.searchInResponseBody", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Network", Op: "SearchInResponseBody", Err: err}
	}
	return
}
660500
func (r *Request) Body(v interface{}) *Request {
	var err error
	if r.err != nil {
		return r
	}
	r.body, err = json.Marshal(v)
	if err != nil {
		r.err = err
		return r
	}
	return r
}
788957
func (p *ProjectOptions) GetBody() string {
	if p == nil || p.Body == nil {
		return ""
	}
	return *p.Body
}
1223951
func (r *vstResponseElement) ParseArrayBody() ([]driver.Response, error) {
	return nil, driver.WithStack(driver.InvalidArgumentError{Message: "ParseArrayBody not allowed"})
}
1262145
func (s *GetSdkOutput) SetBody(v []byte) *GetSdkOutput {
	s.Body = v
	return s
}
769844
func NewBytesResponse(status int, body []byte) *http.Response {
	return &http.Response{
		Status:        strconv.Itoa(status),
		StatusCode:    status,
		Body:          NewRespBodyFromBytes(body),
		Header:        http.Header{},
		ContentLength: -1,
	}
}
919514
func (r *RepositoryComment) GetBody() string {
	if r == nil || r.Body == nil {
		return ""
	}
	return *r.Body
}
597613
func (inv *Investigate) LogHTTPResponseBody(respBody io.ReadCloser) {
	if inv.verbose {
		bytes, err := ioutil.ReadAll(respBody)
		if err != nil {
			inv.Logf("error reading response body: %v", err)
		}
		inv.Logf("response body:\n%s", bytes)
	}
}
901635
func (r *Response) BodyString(body string) *Response {
	r.BodyBuffer = []byte(body)
	return r
}
109873
func (r *httpJSONResponseElement) ParseBody(field string, result interface{}) error {
	if result != nil {
		if err := parseBody(r.bodyObject, field, result); err != nil {
			return driver.WithStack(err)
		}
	}
	return nil
}
832684
func (r *httpVPackResponse) ParseArrayBody() ([]driver.Response, error) {
	if r.bodyArray == nil {
		slice, err := r.getSlice()
		if err != nil {
			return nil, driver.WithStack(err)
		}
		l, err := slice.Length()
		if err != nil {
			return nil, driver.WithStack(err)
		}

		bodyArray := make([]driver.Response, 0, l)
		it, err := velocypack.NewArrayIterator(slice)
		if err != nil {
			return nil, driver.WithStack(err)
		}
		for it.IsValid() {
			v, err := it.Value()
			if err != nil {
				return nil, driver.WithStack(err)
			}
			bodyArray = append(bodyArray, &httpVPackResponseElement{slice: v})
			it.Next()
		}
		r.bodyArray = bodyArray
	}

	return r.bodyArray, nil
}
907747
func (h *HTTPBin) RequestWithBody(w http.ResponseWriter, r *http.Request) {
	resp := &bodyResponse{
		Args:    r.URL.Query(),
		Headers: getRequestHeaders(r),
		Origin:  getOrigin(r),
		URL:     getURL(r).String(),
	}

	err := parseBody(w, r, resp)
	if err != nil {
		http.Error(w, fmt.Sprintf("error parsing request body: %s", err), http.StatusBadRequest)
		return
	}

	body, _ := json.Marshal(resp)
	writeJSON(w, body, http.StatusOK)
}
101919
func (p *ErrorPage) Body() string {
	
	qb422016 := qt422016.AcquireByteBuffer()
	
	p.WriteBody(qb422016)
	
	qs422016 := string(qb422016.B)
	
	qt422016.ReleaseByteBuffer(qb422016)
	
	return qs422016

}
1183066
func JsonBody(body interface{}) RequestOption {
	return func(req *http.Request) (*http.Request, error) {
		b, err := simplejson.DumpBytes(body)
		if err != nil {
			return nil, err
		}
		req.Body = ioutil.NopCloser(bytes.NewBuffer(b))
		req.ContentLength = int64(len(b))
		req.Header.Set("Content-Type", "application/json; charset=utf-8")
		return req, nil
	}
}
1063930
func (p *PullRequestReview) GetBody() string {
	if p == nil || p.Body == nil {
		return ""
	}
	return *p.Body
}