Skip to content

Commit b50a838

Browse files
authored
Merge pull request #18 from crazy-max/post
use POST method
2 parents cc7aa44 + 87d890c commit b50a838

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pinging.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ type PingingOptions struct {
1414

1515
// Success sends a success request to Healthchecks to indicate that a job has completed.
1616
func (c *Client) Success(ctx context.Context, po PingingOptions) (err error) {
17-
return c.request(ctx, http.MethodGet, po.UUID, []byte(po.Logs))
17+
return c.request(ctx, http.MethodPost, po.UUID, []byte(po.Logs))
1818
}
1919

2020
// Fail sends a fail request to Healthchecks to indicate that an error has occurred.
2121
func (c *Client) Fail(ctx context.Context, po PingingOptions) (err error) {
22-
return c.request(ctx, http.MethodGet, fmt.Sprintf("%s/fail", po.UUID), []byte(po.Logs))
22+
return c.request(ctx, http.MethodPost, fmt.Sprintf("%s/fail", po.UUID), []byte(po.Logs))
2323
}
2424

2525
// Start sends a start request to Healthchecks to indicate that a job has started.
2626
func (c *Client) Start(ctx context.Context, po PingingOptions) (err error) {
27-
return c.request(ctx, http.MethodGet, fmt.Sprintf("%s/start", po.UUID), []byte(po.Logs))
27+
return c.request(ctx, http.MethodPost, fmt.Sprintf("%s/start", po.UUID), []byte(po.Logs))
2828
}

0 commit comments

Comments
 (0)