glennhoward

  • Archive
  • RSS
Pop-upView Separately
    • #gilt groupe
    • #dublin
    • #river liffey
  • 5 months ago
  • 3
  • Permalink
  • Share
    Tweet

Creating a JSON post in Java

Here’s a simple bit of code to create a JSON post in Java…

URL url = new URL("http:://www.someUrl.com/someService");
String newRequest = "Whatever the Request you are trying to create is :)";
DefaultHttpClient httpClient = new DefaultHttpClient();
StatusLine responseStatusLine = null;

try {
	HttpPost request = new HttpPost(url.toURI());
	StringEntity params = new StringEntity(newRequest);
	
	request.addHeader("content-type","text/plain");
	request.setEntity(params);
	HttpResponse response = httpClient.execute(request);
					
	responseStatusLine = response.getStatusLine();
		
} catch (IOException e){
	System.err.println(e);
} finally {
	httpClient.getConnectionManager().shutdown();
}
    • #JSON
    • #Java
    • #Post
    • #Request
  • 6 months ago
  • Permalink
  • Share
    Tweet
What a great bios error!!
Pop-upView Separately

What a great bios error!!

  • 6 months ago
  • Permalink
  • Share
    Tweet
When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.
John Lennon
  • 6 months ago
  • Permalink
  • Share
    Tweet

Ha brilliant!

    • #Live Tiles
    • #windows 8
    • #Windows phone 8
  • 6 months ago
  • Permalink
  • Share
    Tweet

This is so cool.

Source: thrashlab.com

    • #NYC
    • #empty america
  • 6 months ago
  • 1
  • Permalink
  • Share
    Tweet
Early morning on the luas
Pop-upView Separately

Early morning on the luas

  • 1 year ago
  • Permalink
  • Share
    Tweet
Sunset @ Lahinch Beach…october 2010
Pop-upView Separately

Sunset @ Lahinch Beach…october 2010

  • 1 year ago
  • Permalink
  • Share
    Tweet

Great tutorial for JS debugging for beginners

  • 1 year ago
  • Permalink
  • Share
    Tweet

Great list of freely available programming books...

Source: netmagazine.com

    • #eBooks
    • #programming
  • 1 year ago
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 5

About

software engineer :: contributor to @mozwebqa :: husband :: dad ::

Me, Elsewhere

  • @_grh on Twitter
  • Facebook Profile
  • 39922743 on Foursquare
  • Linkedin Profile
  • glennhoward on github
  • Xbox Live Profile
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr