I have found an API that can do what I need. The code they supply in the java example is as below but this doesn't work if I paste to Appery server code
// These code snippets use an open-source library. http://unirest.io/java
HttpResponse response = Unirest.post("https://neutrinoapi-html-to-pdf.p.mas...")
.header("X-Mashape-Key", "Ppl1WgnoJwmshCodpzLiyCbzDwQZp1octpdjsnPyGB4TG8I5Ea")
.header("Content-Type", "application/x-www-form-urlencoded")
.field("content", "http://www.rfc-editor.org/news.html")
.field("html-width", 1024)
.field("margin", 10)
.field("title", "My Title")
.asBinary();
How do I call the above in Appery server code?