Skip to content

Fragment Endpoint

The fragment endpoint can be passed in to SSR variants such as picard-js/node via the fragmentUrl option.

The given fragment endpoint has to accept GET requests using the following specification.

Request Parameters

The following request path parameters are send:

NameTypeDescriptionExample
idstringThe base 64 encoded name of the fragmentdGVzdA==

The URL is thought as /<your-url>/{id}, e.g., if you specified /api/v1/fragment as your fragmentUrl then /api/v1/fragment/dGVzdA== would be called to retrieve the fragment of test.

The following request query parameters are send:

NameTypeDescriptionExample
datastringThe base 64 encoded JSON string with the dataeyJmb28iOiJiYXIifQ==

The data is always presented as an object that is stringified by a JSON serialization with the base 64 encoding being performed to be URL safe.

Response

The response must be send as an HTML fragment usign the text/html value set in the Content-Type header.

Released under the MIT License.