This API uses POST
request to communicate and HTTP response codes to indenticate response and error. All requests must include a content-type
of application/json
and the body must be valid JSON.
pip install pdfkit
wkhtmltopdf
200: Success
500: Server Error
http code 500
{
"error" : true,
"response" : "Message error",
}
Request:
POST /pdf HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"content": "<h1>Hellow world</h1>"
}
Successful Response:
HTTP/1.1 200 OK
Server: My RESTful API
Content-Type: application/pdf
Query key | Description |
---|---|
content |
html content |
url |
page url |
options |
reference |