Skip to content

Commit

Permalink
Add example section for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlee85 committed Oct 12, 2023
1 parent 5a05e4e commit 7cda716
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions examples/v7-edge-functions/functions/general/sample-html-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,29 @@ export async function handleHttpRequest(request, context) {
</li>
</ul>
</section>
<section>
<h2>Caching</h2>
<p>Examples demonstrating caching for different request types.</p>
<ul>
<li>
<strong>GET Request</strong>
<pre><code>${createCURLCommand(
'/example/caching'
)}</code></pre>
</li>
<li>
<strong>POST Request with JSON payload 1</strong>
<pre><code>curl -i -X POST ${domain}/example/caching -d '{"key": "value1"}'</code></pre>
</li>
<li>
<strong>POST Request with JSON payload 2</strong>
<pre><code>curl -i -X POST ${domain}/example/caching -d '{"key": "value2"}'</code></pre>
</li>
</ul>
</section>
</div>
<div style="margin-top: 30px; text-align: center;">
<a href="https://docs.edg.io/guides/v7/edge-functions" target="_blank">Edge Functions Documentation</a> | <a href="https://github.com/edgio-docs/edgio-v7-edge-functions-example" target="_blank">View the demo code on GitHub</a>
Expand Down

0 comments on commit 7cda716

Please sign in to comment.