Tag Archives: generics

Apache HttpClient 4 JSON post example with a generic method

In a previous post HttpClient 4 Json Post I showed how to post a Json object to a URL. That was useful, but required writing a method for each type of object you needed posted. A cleaner way is to … Continue reading

Posted in Java | Tagged , , , , , , , | Leave a comment

Refactoring with Generics

I wrote a utility method that used httpclient to retrieve a text file for me. Then I had a need to retrieve a binary file. I ended up with two methods that were very similar. I am a DRY advocate … Continue reading

Posted in Java | Tagged , , | Leave a comment