MCPcopy Create free account
hub / github.com/elimity-com/scim / checkBodyNotEmpty

Function checkBodyNotEmpty

server_test.go:17–27  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

15)
16
17func checkBodyNotEmpty(r *http.Request) error {
18 // Check whether the request body is empty.
19 data, err := ioutil.ReadAll(r.Body)
20 if err != nil {
21 return err
22 }
23 if len(data) == 0 {
24 return fmt.Errorf("passed body is empty")
25 }
26 return nil
27}
28
29// externalID extracts the external identifier of the given attributes.
30func externalID(attributes scim.ResourceAttributes) optional.String {

Callers 3

CreateMethod · 0.85
PatchMethod · 0.85
ReplaceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…