MCPcopy Index your code
hub / github.com/coder/coder / PostCustomNotification

Method PostCustomNotification

codersdk/notifications.go:324–335  ·  view source on GitHub ↗
(ctx context.Context, req CustomNotificationRequest)

Source from the content-addressed store, hash-verified

322}
323
324func (c *Client) PostCustomNotification(ctx context.Context, req CustomNotificationRequest) error {
325 res, err := c.Request(ctx, http.MethodPost, "/api/v2/notifications/custom", req)
326 if err != nil {
327 return err
328 }
329 defer res.Body.Close()
330
331 if res.StatusCode != http.StatusNoContent {
332 return ReadBodyAsError(res)
333 }
334 return nil
335}

Callers 2

TestCustomNotificationFunction · 0.80
customNotificationsMethod · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1

TestCustomNotificationFunction · 0.64