{"id":30717242,"url":"https://github.com/maikvandergaag/bicep-ext-http","last_synced_at":"2025-09-03T08:50:52.076Z","repository":{"id":312521091,"uuid":"1045661309","full_name":"maikvandergaag/bicep-ext-http","owner":"maikvandergaag","description":"Bicep Http Extension","archived":false,"fork":false,"pushed_at":"2025-08-31T07:22:54.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T09:17:57.981Z","etag":null,"topics":["bicep","http"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maikvandergaag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-27T14:21:23.000Z","updated_at":"2025-08-31T07:23:22.000Z","dependencies_parsed_at":"2025-08-31T09:18:00.471Z","dependency_job_id":"e910e68a-ff81-4873-ae1f-d3571d8ac28c","html_url":"https://github.com/maikvandergaag/bicep-ext-http","commit_stats":null,"previous_names":["maikvandergaag/bicep-ext-http"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/maikvandergaag/bicep-ext-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikvandergaag%2Fbicep-ext-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikvandergaag%2Fbicep-ext-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikvandergaag%2Fbicep-ext-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikvandergaag%2Fbicep-ext-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maikvandergaag","download_url":"https://codeload.github.com/maikvandergaag/bicep-ext-http/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maikvandergaag%2Fbicep-ext-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273417284,"owners_count":25101813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bicep","http"],"created_at":"2025-09-03T08:50:47.510Z","updated_at":"2025-09-03T08:50:52.049Z","avatar_url":"https://github.com/maikvandergaag.png","language":"C#","funding_links":[],"categories":["Community"],"sub_categories":["Community Repositories"],"readme":"# Bicep HTTP Extension\n\nA custom Bicep extension that enables HTTP calls directly within Bicep templates. This extension allows you to make HTTP requests during template deployment and use the responses in your Bicep code.\n\nThis extension was build based on idea's and examples from @anthony-c-martin that create a 'GO' http extension. As that extension did not had any options to perform 'POST' requests I created my own C# implementation that supports multiple requests types.\n\n## Overview\n\nThe `bicep-ext-http` extension provides a new resource type `HttpCall` that can perform HTTP requests (GET, POST, PUT, DELETE, PATCH) and capture the response for use in your Bicep templates. This is useful for scenarios like:\n\n- Calling external APIs during deployment. (Adding items to your CMDB)\n- Fetching configuration data from external services\n- Triggering webhooks as part of your infrastructure deployment\n- Integrating with third-party services that don't have native Azure Resource Manager support\n\n## Features\n\n- **Multiple HTTP Methods**: Supports GET, POST, PUT, DELETE, and PATCH requests\n- **Custom Headers**: Add custom headers to your HTTP requests\n- **Request Body**: Include JSON or other content in request bodies\n- **Response Capture**: Access both the response body and HTTP status code\n- **Type Safety**: Full IntelliSense support and type checking in Bicep\n\n## Samples\n\nThe sample folder contains two samples:\n\n- **Simple HTTP Calls**: Simple example to perform different types of HTTP calls. To a Beeceptor endpoint.\n- **Entra token**: Example to be able to retrieve Entra accesstokens. That can be used when you need to make a authenticated api call.\n\n## Installation\n\n### Prerequisites\n\n- Bicep CLI with extensibility support (make sure that you have the preview feature enabled)\n- .NET 9.0 runtime (for local development)\n\n### Setup\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/maikvandergaag/bicep-ext-http.git\n   cd bicep-ext-http\n   ```\n\n2. Build the extension:\n\n   ```powershell\n   dotnet build src/bicep-ext-http.csproj\n   ```\n\n3. Publish the extension:\n\n   ```powershell\n   .\\scripts\\publish.ps1\n   ```\n\n4. Configure your `bicepconfig.json` to use the extension:\n\n   ```json\n   {\n     \"experimentalFeaturesEnabled\": {\n       \"localDeploy\": true,\n       \"extensibility\": true\n     },\n     \"extensions\": {\n       \"http\": \"./extension-publish/bicep-ext-http\"\n     }\n   }\n   ```\n\n## Resource Properties\n\n### HttpCall Resource\n\n| Property | Type | Required | Description |\n|----------|------|----------|-------------|\n| `url` | string | Yes | The target URL for the HTTP request |\n| `method` | string | Yes | HTTP method: 'Get', 'Post', 'Put', 'Delete', or 'Patch' |\n| `headers` | array | No | Array of header objects with `name` and `value` properties |\n| `body` | string | No | Request body content (typically JSON) |\n\n### Output Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `result` | string | The response body from the HTTP call |\n| `statusCode` | int | The HTTP status code returned |\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n\n## Disclaimer\n\nThis extension is provided as-is and should be thoroughly tested before use in production environments. Always validate HTTP responses and handle errors appropriately in your Bicep templates.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaikvandergaag%2Fbicep-ext-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaikvandergaag%2Fbicep-ext-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaikvandergaag%2Fbicep-ext-http/lists"}