Retrofit GET DATA and POST DATA
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.datalink747:Retrofit_Get_Post:1.0.1'
}RxVolley
public void rxvolley(String name,String prenom,String cin,String img)
{
HttpParams params = new HttpParams();
params.put("NomUser", name);
params.put("PrenomUser", prenom);
params.put("CinUser", cin);
params.put("ImgUser", img);
RxVolley.post(BASE_URL_GET_USER, params,
(transferredBytes, totalSize) -> {
Log.d(Constants.TAG,transferredBytes + "==" + totalSize);
Log.d(Constants.TAG,"=====looper" + (Thread.currentThread() == Looper.getMainLooper
().getThread()));
}, new HttpCallback() {
@Override
public void onSuccess(String t) {
Log.d(Constants.TAG,t);
editName.setText("");
editPrenom.setText("");
editCin.setText("");
}
});
}
|
|
|
Copyright 2017 Soussidev, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.