List of usage examples for com.squareup.okhttp FormEncodingBuilder FormEncodingBuilder
FormEncodingBuilder
From source file:practica2_201314795.ListaSimple.java
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed String index = this.jTextField2.getText().toString(); RequestBody formBody = new FormEncodingBuilder().add("numero", index).build(); String eliminado = getString("eliminarNodoLista", formBody); System.out.println(eliminado); this.jTextField2.setText(""); // TODO add your handling code here: }
From source file:practica2_201314795.ListaSimple.java
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed String palabra = this.jTextField3.getText().toString(); RequestBody formBody = new FormEncodingBuilder().add("palabra", palabra).build(); String busqueda = getString("buscarNodoLista", formBody); System.out.println(busqueda); this.jTextField3.setText(""); // TODO add your handling code here: }
From source file:practica2_201314795.Pila.java
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed String dato = this.jTextField1.getText().toString(); RequestBody formBody = new FormEncodingBuilder().add("numero", dato).build(); String apilar = getString("ApilarNodo", formBody); System.out.println(apilar);//from www . j a v a 2 s. c o m this.jTextField1.setText(""); // TODO add your handling code here: }
From source file:practica2_201314795.Pila.java
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed String dato = "0"; RequestBody formBody = new FormEncodingBuilder().add("numero", dato).build(); String retirar = getString("RetirarNodo", formBody); System.out.println(retirar); // TODO add your handling code here: }
From source file:practica2_edd.ColaVentana.java
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: if (!ColaText.getText().equals("")) { RequestBody formBody = new FormEncodingBuilder().add("dato", ColaText.getText()).build(); String r = getString("AgregarCola", formBody); System.out.println(r);//from ww w .j a v a 2 s.c o m } //GEN-LAST:event_jButton1ActionPerformed }
From source file:practica2_edd.Conec.java
public static String InsertarLista(String dato) { RequestBody formBody = new FormEncodingBuilder().add("dato", dato).build(); try {/*from w ww .j a v a 2 s .c o m*/ URL url = new URL("http://0.0.0.0:5000/insertarLista"); Request request = new Request.Builder().url(url).post(formBody).build(); Response response = webClient.newCall(request).execute(); String response_string = response.body().string();//y este seria el string de las respuesta System.out.println(response_string); return response_string; } catch (MalformedURLException ex) { System.out.println(ex.toString()); } catch (IOException ex) { System.out.println(ex.toString()); } return null; }
From source file:practica2_edd.Conec.java
public static String Buscar(String dato) { RequestBody formBody = new FormEncodingBuilder().add("dato", dato).build(); try {//from ww w . ja v a 2s . c o m URL url = new URL("http://0.0.0.0:5000/buscarLista"); Request request = new Request.Builder().url(url).post(formBody).build(); Response response = webClient.newCall(request).execute(); String response_string = response.body().string();//y este seria el string de las respuesta return response_string; } catch (MalformedURLException ex) { System.out.println(ex.toString()); } catch (IOException ex) { System.out.println(ex.toString()); } return null; }
From source file:practica2_edd.Conec.java
public static String IngresarCola(int dato) { RequestBody formBody = new FormEncodingBuilder().add("dato", dato + "").build(); try {/*from w w w. j a v a 2s. c o m*/ URL url = new URL("http://0.0.0.0:5000/insertarCola"); Request request = new Request.Builder().url(url).post(formBody).build(); Response response = webClient.newCall(request).execute(); String response_string = response.body().string();//y este seria el string de las respuesta System.out.println(response_string); return response_string; } catch (MalformedURLException ex) { System.out.println(ex.toString()); } catch (IOException ex) { System.out.println(ex.toString()); } return null; }
From source file:practica2_edd.Conec.java
public static String SacarCola() { RequestBody formBody = new FormEncodingBuilder().add("dato", "").build(); try {// ww w. ja va2 s . co m URL url = new URL("http://0.0.0.0:5000/saleCola"); Request request = new Request.Builder().url(url).post(formBody).build(); Response response = webClient.newCall(request).execute(); String response_string = response.body().string();//y este seria el string de las respuesta System.out.println(response_string); return response_string; } catch (MalformedURLException ex) { System.out.println(ex.toString()); } catch (IOException ex) { System.out.println(ex.toString()); } return null; }
From source file:practica2_edd.Conec.java
public static String IngresarPila(int dato) { RequestBody formBody = new FormEncodingBuilder().add("dato", dato + "").build(); try {//from w ww . j a v a2s . co m URL url = new URL("http://0.0.0.0:5000/insertarPila"); Request request = new Request.Builder().url(url).post(formBody).build(); Response response = webClient.newCall(request).execute(); String response_string = response.body().string();//y este seria el string de las respuesta System.out.println(response_string); return response_string; } catch (MalformedURLException ex) { System.out.println(ex.toString()); } catch (IOException ex) { System.out.println(ex.toString()); } return null; }