Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/02/2016, 20:32
lvinuezav
 
Fecha de Ingreso: diciembre-2007
Mensajes: 218
Antigüedad: 16 años, 4 meses
Puntos: 1
Enviaa formulario a servidor error 403 forbidden

Saludos,

Estimados amigos una vez mas necesito de su ayuda, estoy enviando un formulario hacia un servidor pero al momento del response me sale error 403, la ruta esta bien ya que en el navegador de la pc funciona, detallo codigo.

wd.setUrl("http://www.ruta.com/ruta.php");
wd.setMethod("POST");
wd.setName(etName.getText().toString());
wd.setEmail(etEmail.getText().toString());
wd.setAge(Integer.parseInt(etAge.getText().toStrin g()));


new Thread(){
public void run(){
answer = HttpConnection.getSetDataWeb(wd);

runOnUiThread(new Runnable(){
public void run(){
enableViews(true);
try{
answer = Integer.parseInt(answer) == 1 ? "Form enviado com sucesso!" : "FAIL!";
Toast.makeText(MainActivity.this, answer, Toast.LENGTH_SHORT).show();
}
catch(NumberFormatException e){
Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
}
}.start();

De antemano muchas gracias por la yuda.