nyno-http-get
nyno-http-get — Perform an HTTP GET request in a workflow
Description
- step: nyno-http-get
args:
- '${URL}'
The nyno-http-get step performs an HTTP GET request to the specified URL. The response is stored in the workflow context (${prev} by default or a custom context key via set_context).
- On success, it returns HTTP status and response text.
- On failure, it sets an error object in the context.
Usage in a workflow YAML:
workflow:
- step: nyno-http-get
args: ['https://example.com/api/data']
Parameters
| Parameter | Type | Description |
|---|---|---|
url |
string |
The URL to perform the GET request against. Must include protocol (http:// or https://). |
Return Values
- Returns
0if the request succeeds (HTTP status2xx),1if it fails. - Context (
${prev}by default, or custom viaset_context) is populated with:
{
"HTTP_RESPONSE": "…response body as string…",
"HTTP_STATUS": 200,
"HTTP_ERROR": null
}
- On failure (network error or non-2xx status),
HTTP_ERRORis set with the error message. Example:
{
"HTTP_RESPONSE": "...",
"HTTP_STATUS": 404,
"HTTP_ERROR": "HTTP error 404"
}
- If no URL is provided,
${prev.error}(or custom context) will contain:
{
"usageError": "No URL provided"
}
Behavior
- Performs a standard HTTP GET request to the given URL.
- Stores the response text and HTTP status in context.
- If
set_contextis provided in the workflow step, the response is stored under that key instead of${prev}. - Handles network errors and invalid URLs gracefully by populating an error object.
Examples
Example #1 — Basic GET request
workflow:
- step: nyno-http-get
args: ['https://api.github.com']
Stores the response in ${prev}:
{
"HTTP_RESPONSE": "{...}",
"HTTP_STATUS": 200,
"HTTP_ERROR": null
}
Example #2 — Custom context key
workflow:
- step: nyno-http-get
args: ['https://api.github.com']
context:
set_context: github_api
Stores the response under ${github_api}.
Example #3 — Using response in next step
workflow:
- step: nyno-http-get
args: ['https://nyno.dev/test-get']
- step: ai-mistral-text
args:
- "Does this look like a healthy HTTP response: ${prev}"
Notes
- Only GET requests are supported.
- Response is always returned as a string. For JSON endpoints, parse it in a downstream step if needed.
- Non-2xx HTTP status codes count as failure (
output=1) but still returnHTTP_RESPONSEfor inspection.
See Also
- nyno-http-post: Perform HTTP POST requests.
- nyno-file-write / nyno-file-read: Save or read responses to/from files.