Created
September 17, 2016 13:59
-
-
Save Felipe00/d2740a46c0115f507069b12effb53eca to your computer and use it in GitHub Desktop.
Exemplo de uso do método PUT com a biblioteca do loopJ.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void callLoopjPut() { | |
AsyncHttpClient client = new AsyncHttpClient(); | |
RequestParams params = new RequestParams(); | |
params.add("id", "10"); | |
params.add("name", "Felipe"); | |
params.add("email", "[email protected]"); | |
client.put(Teste.this, "http://www.minha-api.com.br/editarCadastro", params, new AsyncHttpResponseHandler() { | |
@Override | |
public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { | |
// Faz algo | |
} | |
@Override | |
public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { | |
// Faz algo | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment