Skip to content

Instantly share code, notes, and snippets.

View mediocretes's full-sized avatar

Nathan D Acuff mediocretes

  • Expected Behavior
View GitHub Profile
import java.io.*;
import java.net.*;
public class JavaExample {
public static void main(String[] args) throws Exception{
String document = "<html><body>This is a DocRaptor Example</body></html>";
String apikey = "YOUR_API_KEY_HERE";
String encoded_document = URLEncoder.encode(document, "UTF8");
String data = "doc[document_content]=" +encoded_document;
data += "&doc[name]=java_sample.pdf";