func()

in sobject/collections/query.go [23:43]


func (q *query) callout(sobject string, records []sobject.Querier) ([]*sfdc.Record, error) {
	if q == nil {
		panic("collections: Collection Query can not be nil")
	}
	payload, err := q.payload(sobject, records)
	if err != nil {
		return nil, err
	}
	c := &collection{
		method:      http.MethodPost,
		body:        payload,
		endpoint:    endpoint + "/" + sobject,
		contentType: jsonContentType,
	}
	var values []*sfdc.Record
	err = c.send(q.session, &values)
	if err != nil {
		return nil, err
	}
	return values, nil
}