So I'm working with the Signpost OAuth library for Java. I'm running into some complications using the Apache Commons HTTP library with it. Take a look at the following code:
URL url = new URL("http://api.neoseeker.com/forum/get_pm_counts.json");
HttpRequest request = (HttpRequest) url.openConnection();
consumer.sign(request);
request.connect();
System.out.println("Response: " + request.getResponseCode() + " "
+ request.getResponseMessage());
This is taking from this example. You can see that request used to be a HttpURLConnection, but because I'll be using the Apache Commons HTTP library, I changed it to a HttpRequest object. Now, I'm getting errors when I call connect(), getResponseCode(), and getResponseMessage(), because those functions are for a HttpURLConnection. What functions from HttpRequest would I use so I can get the code to compile and run correctly? Thanks!