Tell me how to send the Json request



I am sending the json request code give the error Is there any
way how
to send the json request with authentication.this Code give the
Error
in filenotfound " rel="nofollow">http://api.seatseller.travel/blockTicket"

//st =
json object




       StringBuilder sb = new StringBuilder();  
JSONObject jsonParam = st;//JSON
HttpURLConnection request=null;
OAuthConsumer consumer = new
DefaultOAuthConsumer("tOzL5hTkSz9KiA2RIAECW4g7Uq","cj8HLPmBKnRAsffLe5qpQIZ9Y");
consumer.setTokenWithSecret(null, null); //i pass token as
access token as a null as my server dont need it.

URL url = new URL("http://api.seatseller.travel/blockTicket");
request = (HttpURLConnection) url.openConnection();
request.setDoOutput(true);
request.setRequestMethod("GET");
request.setUseCaches(false);
request.setConnectTimeout(10000);
request.setReadTimeout(10000);
request.setRequestProperty("Content-Type","application/json");


request.setRequestProperty("Host", "android.schoolportal.gr");


consumer.sign(request);
request.connect();
OutputStreamWriter out = new
OutputStreamWriter(request.getOutputStream());
out.write(jsonParam.toString());
out.close();
int HttpResult =request.getResponseCode();
if(HttpResult ==HttpURLConnection.HTTP_OK){
BufferedReader br = new BufferedReader(new
InputStreamReader(
request.getInputStream(),"utf-8"));
String line = null;
while ((line = br.readLine()) != null) {
sb.append(line + "
");
}
br.close();

System.out.println(""+sb.toString());

}else{
System.out.println(request.getResponseMessage());
}
} catch (MalformedURLException e) {

e.printStackTrace();
}
catch (IOException e) {

e.printStackTrace();
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow