Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void HttpPostTest() throws IOException
- {
- http=(HttpConnection)Connector.open(urlTest + CONNECTOR_EXT);//vzpostavi povezavo z serverjem
- System.out.println("Connector " + http.getHost());
- http.setRequestMethod(HttpConnection.POST);
- http.setRequestProperty( "X-ApiKey:", "myapikey" );
- oDStream=http.openDataOutputStream();
- oDStream.write("test,1234".getBytes(), 0 , 9); //pošlje podatke
- oDStream.flush();
- System.out.println("http: " + http.getResponseMessage() + " query " + http.getQuery() + " url " +http.getURL() + " iStream: " + iStream);
- processServerResponse(http,iStream);//ta metoda sprocesira odgovor, vendar je IStream null
- oDStream.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement