MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / GetChanges

Method GetChanges

rest/utilities_testing.go:2594–2601  ·  view source on GitHub ↗

GetChanges returns the set of changes from a GET request for a given user.

(uri string, username string)

Source from the content-addressed store, hash-verified

2592
2593// GetChanges returns the set of changes from a GET request for a given user.
2594func (rt *RestTester) GetChanges(uri string, username string) ChangesResults {
2595 changesResponse := rt.SendUserRequest(http.MethodGet, uri, "", username)
2596 RequireStatus(rt.TB(), changesResponse, http.StatusOK)
2597 var changes ChangesResults
2598 err := base.JSONUnmarshal(changesResponse.Body.Bytes(), &changes)
2599 assert.NoError(rt.TB(), err, "Error unmarshalling changes response")
2600 return changes
2601}
2602
2603// PostChanges issues a changes POST request for a given user.
2604func (rt *RestTester) PostChanges(uri, body, username string) ChangesResults {

Calls 4

SendUserRequestMethod · 0.95
TBMethod · 0.95
JSONUnmarshalFunction · 0.92
RequireStatusFunction · 0.85