Skip to content

Commit

Permalink
feat: custom header fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Feb 19, 2025
1 parent 3b044dd commit 0fd7cb0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
7 changes: 6 additions & 1 deletion official/docs/curl/current/webhooks/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ curl -X POST https://api.easypost.com/v2/webhooks \
-H 'Content-Type: application/json' \
-d '{
"webhook": {
"url": "example.com"
"url": "example.com",
"webhook_secret": "my_secret",
"custom_headers": [{
"name": "X-Header-Name",
"value": "header_value"
}],
}
}'
10 changes: 9 additions & 1 deletion official/docs/curl/current/webhooks/update.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
curl -X PATCH https://api.easypost.com/v2/webhooks/hook_... \
-u "EASYPOST_API_KEY":
-u "EASYPOST_API_KEY": \
-H 'Content-Type: application/json' \
-d '{
"webhook_secret": "my_secret",
"custom_headers": [{
"name": "X-Header-Name",
"value": "header_value"
}],
}'
9 changes: 6 additions & 3 deletions official/fixtures/client-library-fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@
"phone": "5555555555"
}
},
"webhook_hmac_signature": "hmac-sha256-hex=38f3f53c103713df81616a0a186d77141957323ec21d5fe9363db93840f527db",
"webhook_secret": "sécret",
"webhook_url": "http://example.com"
"webhooks": {
"url": "http://example.com",
"secret": "sécret",
"custom_headers": [{"name": "test", "value": "header"}],
"hmac_signature": "hmac-sha256-hex=38f3f53c103713df81616a0a186d77141957323ec21d5fe9363db93840f527db"
}
}

0 comments on commit 0fd7cb0

Please sign in to comment.