Skip to content

Commit b90f2c4

Browse files
committed
Add llms.txt and update home samples.
1 parent e60e12e commit b90f2c4

File tree

4 files changed

+5885
-6
lines changed

4 files changed

+5885
-6
lines changed

sites/build_home_samples.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(self, name: str, src: str):
1515
src_padding = src
1616
# Count number of line in src, add padding if necessary
1717
nl = src_padding.count("\n")
18-
max_line = 12
18+
max_line = 14
1919
if nl < max_line:
2020
src_padding += "\n" * (max_line - nl)
2121
self.src = src_padding
@@ -85,6 +85,7 @@ def make_home_samples():
8585
Sample(
8686
name="Form",
8787
src="""\
88+
# Sending form data
8889
POST https://example.org/contact
8990
[Form]
9091
default: false
@@ -124,23 +125,27 @@ def make_home_samples():
124125
Sample(
125126
name="Capture Data",
126127
src="""\
127-
# Get home:
128+
# Go home and capture token
128129
GET https://example.org
129130
HTTP 200
130131
[Captures]
131132
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
132133
133134
134135
# Do login!
135-
POST https://example.org/login?user=toto&password=1234
136+
POST https://example.org/login
136137
X-CSRF-TOKEN: {{csrf_token}}
138+
[Form]
139+
user: toto
140+
password: 1234
137141
HTTP 302
138142
""",
139143
),
140144
Sample(
141145
name="JSON Body",
142146
src="""\
143-
# Create a new doggy thing with JSON body:
147+
# Create a new doggy thing with JSON body.
148+
# JSON body can be inlined:
144149
POST https://example.org/api/dogs
145150
{
146151
"id": 0,
@@ -155,6 +160,7 @@ def make_home_samples():
155160
Sample(
156161
name="SOAP / XML Body",
157162
src="""\
163+
# Like JSON body, XML bidy can be inlined to use SOAP APIs:
158164
POST https://example.org/InStock
159165
Content-Type: application/soap+xml; charset=utf-8
160166
SOAPAction: "http://www.w3.org/2003/05/soap-envelope"

sites/hurl.dev/_includes/top-nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="top-nav-link u-d-block-md">
2525
<a class="top-nav-link-a" href="https://github.com/Orange-OpenSource/hurl" alt="GitHub">
2626
<span class="svg-icon"><svg viewBox="0 0 496 512" width="18" height="18"><use href="#github"></use></svg>&nbsp;</span>
27-
<span class="u-underline">GitHub</span><span class="github">14k</span>
27+
<span class="u-underline">GitHub</span><span class="github">16k</span>
2828
</a>
2929
</div>
3030
<div class="top-nav-link u-d-block-md">

sites/hurl.dev/humans.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A simple sample with multiple requests:
1313
# ------------------------------------
1414

1515
POST https://example.net/api/contacts
16-
[FormParams]
16+
[Form]
1717
token: {{token}}
1818
email: toto@rookie.net
1919
HTTP 201

0 commit comments

Comments
 (0)