A Real Example: Creating a GitHub Issue
You want to create a GitHub issue programmatically. Looking at GitHub's API documentation:
- Method: POST
- Endpoint:
https://api.github.com/repos/{owner}/{repo}/issues - Authentication: Bearer token (your GitHub personal access token)
- Body: JSON with title, body, labels, etc.
In your HTTP module:
Method: POST
URL: https://api.github.com/repos/mycompany/myrepo/issues
Headers:
Authorization: Bearer YOUR_GITHUB_TOKEN
Content-Type: application/json
Accept: application/vnd.github+json
Body:
{
"title": "Bug: Login page crashes on mobile",
"body": "Description of the issue here",
"labels": ["bug", "high-priority"]
}
When executed, GitHub creates the issue and returns:
{
"id": 123456,
"number": 42,
"title": "Bug: Login page crashes on mobile",
"html_url": "https://github.com/mycompany/myrepo/issues/42",
"state": "open"
}
You can now map these values into subsequent steps — maybe send a message to Slack with the issue URL, or log it to a spreadsheet.