Microservice to generate QR-code in png
3.9K
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.
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.
POST /generate{
"size": 256,
"content": "https://github.com/etilite/qr-coder"
}
size in pixels of image side, intcontent is a string to encode, stringRequest 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
The response will be a binary PNG file with the encoded content.
Content type
Image
Digest
sha256:9daf58f9d…
Size
3 MB
Last updated
about 2 years ago
docker pull etilite/qr-coder