http://192.168.0.101:8080/messenger/webapi/login/?name=zeeshan&password=123
以上是我的网址,我得到回复“登录成功”,我试图在我的Android应用程序上获得响应,但应用程序崩溃
Log, i have also tried @Query instead of @Path but its giving me same error
我正在使用此注释
String BASE_URL = "http://192.168.0.101:8080/messenger/webapi/";
@GET("login/?name={name}&password={password}")
Call<String> login(@Path("name") String name, @Path("password") String password);
LoginActivity
private void loginUser() {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(Api.BASE_URL)
.addConverterFactory(ScalarsConverterFactory.create())
.build();
Api api = retrofit.create(Api.class);
Log.e("TAG", name + " " + password);
try {
Call<String> call = api.login(name,password);
call.enqueue(new Callback<String>() {
@Override
public void onResponse(Call<String> call, Response<String> response) {
String res = response.body();
Log.e("TAG", res);
}
@Override
public void onFailure(Call<String> call, Throwable t) {
Log.e("TAG", t.getMessage());
}
});
}catch(Exception e){
Log.e("TAG",e.toString());
}
}
答案 0 :(得分:0)
df1 = pd.DataFrame(np.random.rand(10,4),columns=list('ABCD'), index = list ('IJKLMNOPQR'))
df2 = pd.DataFrame({'1': [1,2,3,4,5,6,7], '2':[3,4,5,6,7,8,9]}, index =list('IQLMRFW') )