This repository was archived by the owner on Mar 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhttp_patterns.flow.yaml
More file actions
88 lines (77 loc) · 2.67 KB
/
http_patterns.flow.yaml
File metadata and controls
88 lines (77 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: http_patterns_test
description: |
Test different HTTP integration patterns: registry tools (http.fetch), generic HTTP adapter,
OpenAI/Anthropic manifest tools, and POST requests. Demonstrates tool resolution hierarchy
and various approaches to HTTP-based integrations with their trade-offs.
on: cli.manual
vars:
test_url: "https://postman-echo.com/get"
steps:
# Test 1: Registry-defined http.fetch tool (simple, GET-only)
- id: test_http_fetch
use: http.fetch
with:
url: "{{ test_url }}"
# Test 2: Generic HTTP adapter (flexible, all methods)
- id: test_generic_http
use: http
with:
url: "{{ test_url }}"
method: "GET"
headers:
User-Agent: "BeemFlow/1.0"
X-Test-Header: "integration-test"
# Test 3: OpenAI manifest-based tool (API-specific defaults)
- id: test_openai_manifest
use: openai.chat_completion
with:
model: "gpt-4o-mini"
messages:
- role: user
content: "Say exactly: 'OpenAI manifest tool works!'"
# Test 4: Anthropic manifest-based tool (different API structure)
- id: test_anthropic_manifest
use: anthropic.chat_completion
with:
model: "claude-3-haiku-20240307"
messages:
- role: user
content: "Say exactly: 'Anthropic manifest tool works!'"
# Test 5: HTTP POST with body (only possible with generic adapter)
- id: test_http_post
use: http
with:
url: "https://postman-echo.com/post"
method: "POST"
headers:
Content-Type: "application/json"
body: |
{
"message": "Testing POST with BeemFlow",
"timestamp": "{{ now }}"
}
# Test 6: Verify all patterns work and show differences
- id: verify_results
use: core.echo
with:
text: |
🧪 HTTP Patterns Test Results:
📡 Registry Tool (http.fetch):
- URL: {{ test_http_fetch.url }}
- Simple GET-only syntax
- Perfect for basic fetching
🔧 Generic HTTP Adapter:
- URL: {{ test_generic_http.url }}
- Custom headers supported
- Supports all HTTP methods
🤖 OpenAI Manifest Tool:
- Response: {{ test_openai_manifest.choices[0].message.content }}
- API-specific defaults and validation
🧠 Anthropic Manifest Tool:
- Response: {{ test_anthropic_manifest.content[0].text }}
- Different response structure handled automatically
📤 HTTP POST Example:
- Posted to: {{ test_http_post.url }}
- Method: {{ test_http_post.method }}
- Body sent successfully
✅ All HTTP patterns working correctly!