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

Method PostTestNotification

codersdk/notifications.go:197–208  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

195}
196
197func (c *Client) PostTestNotification(ctx context.Context) error {
198 res, err := c.Request(ctx, http.MethodPost, "/api/v2/notifications/test", nil)
199 if err != nil {
200 return err
201 }
202 defer res.Body.Close()
203
204 if res.StatusCode != http.StatusNoContent {
205 return ReadBodyAsError(res)
206 }
207 return nil
208}
209
210type UpdateNotificationTemplateMethod struct {
211 Method string `json:"method,omitempty" example:"webhook"`

Callers 2

TestNotificationTestFunction · 0.80
testNotificationsMethod · 0.80

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1

TestNotificationTestFunction · 0.64