Skip to content

docs: Add HttpRequest effect and delay_seconds documentation#1144

Open
promptless[bot] wants to merge 2 commits intomainfrom
promptless/http-request-delayed-effects
Open

docs: Add HttpRequest effect and delay_seconds documentation#1144
promptless[bot] wants to merge 2 commits intomainfrom
promptless/http-request-delayed-effects

Conversation

@promptless
Copy link
Copy Markdown
Contributor

@promptless promptless bot commented Apr 16, 2026

Open this suggestion in Promptless to view citations and reasoning process

Documents two new SDK capabilities: the HttpRequest effect for making HTTP requests from plugins with optional effect chaining based on response status, and the delay_seconds parameter for asynchronous or delayed effect execution across all effect methods. Backend implementation in PR #18918 (canvas-medical/canvas) complements the SDK changes from PR #1633 (canvas-medical/canvas-plugins).

https://canvasmedical.atlassian.net/browse/KOALA-4751

Tip: Tell your friends working on non-commercial open-source projects to apply for free Promptless access at promptless.ai/oss ❤️

- Add new HTTP Request effect page documenting HttpRequest class
  for making HTTP requests from plugins with effect chaining
- Document delay_seconds parameter for async/delayed effect execution
- Add HTTP_REQUEST to effect types table
- Update navigation menu to include HTTP Request effect
@@ -0,0 +1,132 @@
---
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created HttpRequest effect documentation based on HttpRequest class implementation in canvas_sdk/effects/http_request.py, including url, method, headers, body, on_success, and on_failure attributes from the PR.

Source: canvas-medical/canvas-plugins#1633

return [layout.apply()]
```

### Delayed and Asynchronous Execution
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added delay_seconds parameter documentation based on the validate_delay_seconds decorator and updated effect methods in canvas_sdk/effects/base.py. The parameter supports None for sync execution, 0 for async, and positive integers for delayed async execution.

Source: canvas-medical/canvas-plugins#1633

@mbiannaccone mbiannaccone marked this pull request as ready for review April 16, 2026 19:49
@mbiannaccone mbiannaccone requested a review from a team as a code owner April 16, 2026 19:49
@promptless
Copy link
Copy Markdown
Contributor Author

promptless bot commented Apr 16, 2026

I noticed that some CI checks failed for this PR. I'm investigating whether the failures are caused by this suggestion. If they're unrelated or pre-existing, I'll leave this suggestion unchanged and create a separate suggestion if a standalone docs fix is needed.

- Use python?partial=true for all code blocks to handle unreleased
  canvas_sdk.effects.http_request import
- Remove return statement outside function in the "Chained Effects with
  Delays" snippet to fix SyntaxError
@aws-amplify-us-west-2
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1144.d298pum72820gn.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants