sercrod

*fetch

*fetch loads JSON from a URL and writes it into Sercrod host data. It is the simple GET-only helper.

<serc-rod data='{"items":[]}' *fetch="/api/items.json:items">
  <ul>
    <li *for="item of items">%item.title%</li>
  </ul>
</serc-rod>

Placement

*fetch uses a URL with an optional placement key.

*fetch does not use *response, *into, $pending, $error, or $response.

Use *api when you need method selection, request bodies, file inputs, request metadata, dry-run markers, or response placement through *response.