Sign inSign up

etilite/qr-coder

By etilite

Updated about 2 years ago

Microservice to generate QR-code in png

Image
Integration & delivery
Developer tools
Web servers
0

3.9K

etilite/qr-coder repository overview

qr-coder

GitHub

Lightweight microservice written in Go to generate QR-codes in png format.

By default, qr-coder adds to content UTF-8 BOM prefix for better unicode-compatibility with scanners.

Usage

Quick Start with Docker
docker run --rm -p 8080:8080 -e HTTP_ADDR=:8080 etilite/qr-coder:latest

This will start the service and expose its API on port 8080.

API
Request
  • POST /generate
{
  "size": 256,
  "content": "https://github.com/etilite/qr-coder"
}
  • size in pixels of image side, int
  • content is a string to encode, string

Request Example:

Using cURL, you can make a request like this:

curl --location 'localhost:8080/generate' \
--header 'Content-Type: application/json' \
--data '{
  "size": 256,
  "content": "https://github.com/etilite/qr-coder"
}' -o img.png
Response

The response will be a binary PNG file with the encoded content.

response

Tag summary

Content type

Image

Digest

sha256:9daf58f9d

Size

3 MB

Last updated

about 2 years ago

docker pull etilite/qr-coder