id: api-tinypng

info:
  name: TinyPNG API Test
  author: zzeitlin
  severity: info
  reference:
    - https://tinypng.com/developers
  metadata:
    max-request: 1
  tags: token-spray,tinypng

self-contained: true

http:
  - method: POST
    path:
      - "https://api.tinify.com/shrink"

    headers:
      Authorization: Basic {{base64('api:' + token)}}
    matchers:
      - type: word
        part: header
        words:
          - 'Compression-Count'
          - 'compression-count'
        condition: or

# digest: 4a0a00473045022100ef6a53ed8e8e82c579cd8cc388c347d57cc2911b4a12228bd92306c8cdb3a86402203320dd7e0be941832c019b41fdab5f42b938a5f1264f7435c1931ec2bea36d58:922c64590222798bb761d5b6d8e72950
