MCPcopy Create free account
hub / github.com/gotify/server / withJSON

Method withJSON

api/application_test.go:670–674  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

668}
669
670func (s *ApplicationSuite) withJSON(value interface{}) {
671 jsonVal, _ := json.Marshal(value)
672 s.ctx.Request = httptest.NewRequest("POST", "/application", bytes.NewBuffer(jsonVal))
673 s.ctx.Request.Header.Set("Content-Type", "application/json")
674}
675
676// A modified version of https://stackoverflow.com/a/20397167/4244993 from Attila O.
677func upload(values map[string]*os.File) (contentType string, buffer bytes.Buffer, err error) {

Calls

no outgoing calls

Tested by

no test coverage detected