Skip to content

Commit

Permalink
Document HTTP API endpoints in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jsphpl committed Oct 2, 2024
1 parent e5481f5 commit fa8391b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Templates and schemas are plain text files and therefore easily manageable. The

The web service can be run as a simple go binary or as a [docker image](https://hub.docker.com/r/sehrgutesoftware/httpdf).

### API

#### `POST /templates/{template}/render`
Render the template using the JSON-encoded data provided in the request body. Successful response is of `Content-Type: application/pdf`.

#### `GET /templates/{template}/preview`
Render an HTML preview of the template using data from the template's `example.json` file. Useful for template development.

### Creating Templates

> Check the [templates/example](./templates/example/) directory for an example template.
Expand Down

0 comments on commit fa8391b

Please sign in to comment.