Note
Please submit a Feature Request for new features or Open an Issue if you find any bugs.
Input | Required | Default | Description |
---|---|---|---|
url | Yes | - | URL for Request |
method | - | POST |
Request Method |
data | - | - | Request Data JSON * |
headers | - | - | Request Headers JSON |
params | - | - | Request Parameters JSON * |
username | - | - | Basic Auth Username |
password | - | - | Basic Auth Password |
insecure | - | false |
Ignore SSL Errors |
file | - | - | File Path to Send * |
name | - | file |
File Form Key Name |
data - Only used for PUT
, POST
, DELETE
, and PATCH
. Data is parsed with JSON.parse
.
params - These can be specified in the URL or added here as JSON key/value pairs.
file - When sending a file, multipart/form-data
wil be used and data
will be added to the form data with the
key name
. The file path is relative to the workspace/working directory.
For more information on inputs, see: https://axios-http.com/docs/req_config
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
Output | Description |
---|---|
status | Response Status |
data | Response Data |
- name: 'Web Request'
id: test
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
- name: 'Echo Output'
run: |
echo '${{ steps.test.outputs.status }}'
echo '${{ steps.test.outputs.data }}'
💡 Click on an example heading to expand or collapse the example.
Make a GET Request
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/get
method: 'GET'
Send Data
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
data: '{"key": "value"}'
Send File
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
file: path/to/file.txt
All Inputs
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
method: 'POST'
data: '{"key": "value"}'
headers: '{"header": "value"}'
params: '{"parameter": "value"}'
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
insecure: false
file: path/to/file.txt
name: file
More Examples Coming Soon...
The following rolling tags are maintained.
You can view the release notes for each version on the releases page.
For general help or to request a feature, see:
- Q&A Discussion: https://github.com/cssnr/web-request-action/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/web-request-action/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results, you can:
- Report an Issue: https://github.com/cssnr/web-request-action/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: https://cssnr.github.io/feedback/
For more information, see the CSSNR SUPPORT.md.
Currently, the best way to contribute to this project is to star this project on GitHub.
For more information, see the CSSNR CONTRIBUTING.md.
Additionally, you can support other GitHub Actions I have published:
- Stack Deploy Action
- Portainer Stack Deploy
- VirusTotal Action
- Mirror Repository Action
- Update Version Tags Action
- Update JSON Value Action
- Parse Issue Form Action
- Cloudflare Purge Cache Action
- Mozilla Addon Update Action
- Docker Tags Action
For a full list of current projects to support visit: https://cssnr.github.io/