{"id":13625003,"url":"https://github.com/indiesdev/curl","last_synced_at":"2025-04-16T01:33:21.373Z","repository":{"id":41358900,"uuid":"267565373","full_name":"indiesdev/curl","owner":"indiesdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-09T19:34:06.000Z","size":8620,"stargazers_count":37,"open_issues_count":9,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-16T08:48:11.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indiesdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-05-28T10:54:25.000Z","updated_at":"2025-02-27T18:17:38.000Z","dependencies_parsed_at":"2024-04-16T11:57:51.329Z","dependency_job_id":null,"html_url":"https://github.com/indiesdev/curl","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":"0.16000000000000003","last_synced_commit":"d2c111eded6242f815ed332fb70c3d57bb71c606"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesdev%2Fcurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesdev%2Fcurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesdev%2Fcurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesdev%2Fcurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indiesdev","download_url":"https://codeload.github.com/indiesdev/curl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249182507,"owners_count":21226081,"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","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":[],"created_at":"2024-08-01T21:01:49.596Z","updated_at":"2025-04-16T01:33:21.351Z","avatar_url":"https://github.com/indiesdev.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# cURL for GitHub Action\n\nYou can use this action to perform REST API requests, using the [axios](https://github.com/axios/axios) module.\n\n# Usage\n\n```yaml\nname: Example of cURL action\n\non: [push]\njobs:\n  test-curl-action:\n    name: \"Perform REST API request\"\n    runs-on: ubuntu-latest\n    steps:\n      - name: \"Call API\"\n        uses: indiesdev/curl@v1.1\n        with:\n          # The target URL\n          # Required: true if custom-config is not set\n          url: https://reqres.in/api/users\n\n          # The request method, basically it's one of GET|POST|PUT|PATCH\n          # Default is GET\n          method: \"POST\"\n\n          # List of response status codes to be accepted, else it will set the job to be failed\n          # If more than one value is needed, you can use comma (,) as separator\n          # In this case if the response status code is not one of 200, 201 and 204, the job will be failed\n          # Default is 200,201,204\n          accept: 200,201,204\n\n          # Headers can be passed through with a json object string\n          headers: '{ \"custom-header\": \"value\" }'\n\n          # Params can be passed through with a json object string\n          params: '{ \"param1\": \"value\", \"param2\": \"value2\" }'\n\n          # Body request\n          # Apply only to POST|PUT request\n          body: '{ \"name\": \"breeze\",  \"job\": \"devops\" }'\n\n          # Request timeout (millisec)\n          # Default: 1000\n          timeout: 1000\n\n          # Basic authentication using username and password\n          # This will override the Authorization header, for example Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l\n          # Format =\u003e username:password as base 64\n          basic-auth-token: ${{ secrets.curl_auth_token }}\n\n          # The authentication using token\n          # This will override the Authorization header, for example Authorization: Bearer QWxhZGRpbjpPcGVuU2VzYW1l\n          bearer-token: ${{ secrets.bearer_token }}\n\n          # If you want to use proxy with the request, you can use proxy-url\n          # Format =\u003e host:port\n          proxy-url: https://proxy-url:3000\n\n          # If the proxy host requires authentication, you can use proxy-auth to pass credentials\n          # Format =\u003e username:password as base64\n          proxy-auth-token: ${{ secrets.proxy_auth_token }}\n\n          # If it is set to true, it will show the response log in the GitHub UI\n          # Default: false\n          log-response: false\n\n          # The number of attempts before giving up\n          # Default: 1\n          retries: 3\n\n          # If you want to use axios config directly, you can pass a config file to the action\n          # The file is just basically a json file that has the same format as axios config https://github.com/axios/axios#request-config\n          # If this input is set, it will ignore other inputs related to the config\n          # The path file is relative to the root directory of the repo\n          custom-config: .github/workflows/curl-config.json\n```\n\n# Response object\n\n```javascript\n{\n  // `data` is the response that was provided by the server\n  \"data\": {},\n\n  // `status` is the HTTP status code from the server response\n  \"status\": 200,\n\n  // `headers` the HTTP headers that the server responded with\n  // All header names are lower cased and can be accessed using the bracket notation.\n  // Example: `response.headers['content-type']`\n  \"headers\": {},\n\n}\n\n```\n\n# Use Response\n\n```yaml\nname: Example of cURL action\n\non: [push]\njobs:\n  test-curl-action:\n    name: \"Perform REST API\"\n    runs-on: ubuntu-latest\n    steps:\n      - name: \"Call API 1\"\n        uses: indiesdev/curl@v1.1\n        id: api\n        with:\n          url: https://reqres.in/api/users\n          method: \"POST\"\n          accept: 201\n          body: '{ \"name\": \"breeze\", \"job\": \"devops\" }'\n          log-response: true\n      - name: \"Call API 2\"\n        uses: indiesdev/curl@v1.1\n        id: api2\n        with:\n          url: https://reqres.in/api/users\n          method: \"POST\"\n          accept: 201\n          # you can use multiline format to construct json data object, the content should be yml format.\n          # this format apply to inputs: body, headers and params\n          body: |\n            name: breeze\n            job: devops\n          log-response: true\n      - name: \"Use response\"\n        run: echo ${{ steps.api.outputs.response }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findiesdev%2Fcurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findiesdev%2Fcurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findiesdev%2Fcurl/lists"}