master branch is deprecated. Please use main or v1 to get the latest version of this action. It is recommended to use a fixed version.
Request Configuration
Argument
Description
Default
url
Request URL
required Field
method
Request Method
POST
contentType
Request ContentType
application/json
data
Request Body Content: - text content like JSON or XML - key=value pairs separated by '&' and contentType: application/x-www-form-urlencoded
only for POST / PUT / PATCH Requests
'{}'
files
Map of key / absolute file paths send as multipart/form-data request to the API, if set the contentType is set to multipart/form-data, values provided by data will be added as additional FormData values, nested objects are not supported. Example provided in the test Workflow of this Action
'{}'
file
Single absolute file path send as application/octet-stream request to the API, if set the contentType is set to application/octet-stream. This input will be ignored if either data or files input is present. Example provided in the test Workflow of this Action
Additional header values as JSON string, keys in this object overwrite default headers like Content-Type
'{}'
escapeData
Escape newlines in data string content. Use 'true' (string) as value to enable it
preventFailureOnNoResponse
Prevent this Action to fail if the request respond without an response. Use 'true' (string) as value to enable it
ignoreStatusCodes
Prevent this Action to fail if the request respond with one of the configured Status Codes. Example: '404,401'
Response
Variable
Description
response
Response as JSON String
To display HTTP response data in the GitHub Actions log give the request an id and access its outputs. You can also access specific field from the response data using fromJson() expression.
请发表评论