https://github.com/cssnr/web-request-action
Web Request Action
https://github.com/cssnr/web-request-action
actions
Last synced: 28 days ago
JSON representation
Web Request Action
- Host: GitHub
- URL: https://github.com/cssnr/web-request-action
- Owner: cssnr
- License: gpl-3.0
- Created: 2024-07-28T07:32:45.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-03-03T00:41:29.000Z (4 months ago)
- Last Synced: 2025-03-03T01:27:03.927Z (4 months ago)
- Topics: actions
- Language: JavaScript
- Homepage: https://cssnr.github.io
- Size: 378 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/cssnr/web-request-action/tags)
[](https://github.com/cssnr/web-request-action/tags)
[](https://github.com/cssnr/web-request-action/releases/latest)
[](https://github.com/cssnr/web-request-action/actions/workflows/release.yaml)
[](https://github.com/cssnr/web-request-action/actions/workflows/test.yaml)
[](https://github.com/cssnr/web-request-action/actions/workflows/lint.yaml)
[](https://sonarcloud.io/summary/new_code?id=cssnr_web-request-action)
[](https://github.com/cssnr/web-request-action/graphs/commit-activity)
[](https://codeberg.org/cssnr/web-request-action)
[](https://github.com/cssnr/web-request-action)
[](https://cssnr.github.io/)
[](https://discord.gg/wXy6m2X8wY)# Web Request Action
- [Inputs](#Inputs)
- [Outputs](#Outputs)
- [Examples](#Examples)
- [Tags](#Tags)
- [Support](#Support)
- [Contributing](#Contributing)> [!NOTE]
> Please submit a [Feature Request](https://github.com/cssnr/web-request-action/discussions/categories/feature-requests)
> for new features or [Open an Issue](https://github.com/cssnr/web-request-action/issues) if you find any bugs.## Inputs
| 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
```yaml
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
```## Outputs
| Output | Description |
| :----- | :-------------- |
| status | Response Status |
| data | Response Data |```yaml
- 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 }}'
```## Examples
💡 _Click on an example heading to expand or collapse the example._
Make a GET Request
```yaml
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/get
method: 'GET'
```Send Data
```yaml
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
data: '{"key": "value"}'
```Send File
```yaml
- name: 'Web Request'
uses: cssnr/web-request-action@v1
with:
url: https://httpbin.org/post
file: path/to/file.txt
```All Inputs
```yaml
- 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...
## Tags
The following rolling [tags](https://github.com/cssnr/web-request-action/tags) are maintained.
| Tag | Example | Target | Bugs | Feat. | Description |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :------- | :--: | :---: | :-------------------------------------------------------- |
| [](https://github.com/cssnr/web-request-action/releases/latest) | `vN` | `vN.x.x` | ✅ | ✅ | Includes new features but is always backwards compatible. |
| [](https://github.com/cssnr/web-request-action/releases/latest) | `vN.N` | `vN.N.x` | ✅ | ❌ | Only receives bug fixes. This is the most stable tag. |
| [](https://github.com/cssnr/web-request-action/releases/latest) | `vN.N.N` | `vN.N.N` | ❌ | ❌ | Not a rolling tag. **Not** recommended. |You can view the release notes for each version on the [releases](https://github.com/cssnr/web-request-action/releases) page.
# Support
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-requestsIf 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/](https://cssnr.github.io/feedback/?app=Web%20Request%20Action)For more information, see the CSSNR [SUPPORT.md](https://github.com/cssnr/.github/blob/master/.github/SUPPORT.md#support).
# Contributing
Currently, the best way to contribute to this project is to star this project on GitHub.
For more information, see the CSSNR [CONTRIBUTING.md](https://github.com/cssnr/.github/blob/master/.github/CONTRIBUTING.md#contributing).
Additionally, you can support other GitHub Actions I have published:
- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
- [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)For a full list of current projects to support visit: [https://cssnr.github.io/](https://cssnr.github.io/)