Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/httpjson: add minify_json template helper #74

Merged
merged 2 commits into from
Jan 23, 2024
Merged

Commits on Jan 17, 2024

  1. pkg/httpjson: add minify_json template helper

    This helper allows nicely formatted JSON to be sent the the client as
    single-line JSON text.
    
    rules:
    - path: "/static/minify"
      methods: ["GET"]
    
      responses:
      - status_code: 200
        body: |-
          {{ minify_json `
          {
          	"key1": "value1",
          	"key2": "value2"
          }
          `}}
    
    will respond to requests to /static/minify with {"key1":"value1","key2":"value2"}.
    efd6 committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    9fede70 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

  1. address pr comment

    efd6 committed Jan 22, 2024
    Configuration menu
    Copy the full SHA
    9d64e0a View commit details
    Browse the repository at this point in the history