public final class EncodeQRCode extends APIServlet.APIRequestHandler
The EncodeQRCode API converts a UTF-8 string to a base64-encoded jpeg image of a 2-D QR (Quick Response) code, using the ZXing library.
The output qrCodeBase64 string can be incorporated into an in-line HTML image like this: <img src="data:image/jpeg;base64,qrCodeBase64">
The output qrCodeBase64 can be input to the DecodeQRCode API to recover the original qrCodeData.
Request parameters:
Notes:
Response fields:
DESCRIPTION_FIELD, MESSAGE_FIELD, NAME_FIELD
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowRequiredBlockParameters() |
protected org.json.simple.JSONStreamAware |
processRequest(javax.servlet.http.HttpServletRequest request) |
protected boolean |
requireBlockchain() |
protected boolean |
requirePost() |
getAPITags, getFileParameter, getParameters, processRequest, requireFullClient, requirePassword, startDbTransaction
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest request) throws NxtException
processRequest
in class APIServlet.APIRequestHandler
NxtException
protected final boolean requirePost()
requirePost
in class APIServlet.APIRequestHandler
protected boolean allowRequiredBlockParameters()
allowRequiredBlockParameters
in class APIServlet.APIRequestHandler
protected boolean requireBlockchain()
requireBlockchain
in class APIServlet.APIRequestHandler