API ?act=register&email={email}&fullname={fullname}&password={pas} display error
FATAL EXCEPTION: main java.lang.IllegalArgumentException: URL query string "act = register & email = {email} & fullname = {fullname} & password = {pas}" must not have replace block. For dynamic query parameters use @Query. for method ApiInterface.register at retrofit2.ServiceMethod $ Builder.methodError (ServiceMethod.java:695) at retrofit2.ServiceMethod $ Builder.methodError (ServiceMethod.java:686) at retrofit2.ServiceMethod $ Builder, of a file of a file of a at retrofit2.ServiceMethod $ Builder.parseMethodAnnotation (ServiceMethod.java:250) at retrofit2.ServiceMethod $ Builder.build (ServiceMethod.java:169) at retrofit2.Retrofit.loadServiceMethod (Retrofit.java66666666a666a66a66a6646) at retrofit2.Retrofit.loadServiceMethod (Retrofit.java66646 )6666646A athe retrofit2. (Retrofit.java:145) at $ Proxy0.register (Native Method) at project.avtopost.kz.kudakz.SignupActivity.attemptLogin (SignupActivity.java:208) at project.avtopost.kz.kudakz.SignupActivity.access $ 000 (SignupActivity .java: 48) at project.avtopost.kz.kudakz.SignupActivity $ 2.onClick (SignupActivity.java:102) at android.view.View.performClick (View.java:4084) at android.view.View $ PerformClick.run (View.java:16966) at android.os.Handler.handleCallback (Handler.java:615) at android.os.Handler.dispatchMessage (Handler.java : 92) at android.os.Looper.loop (Looper.java:137) at android.app.ActivityThread.main (ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative (Native Method) at java. lang.reflect.Method.invoke (Method.java Sl11) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main (ZygoteInit. java: 553) at dalvik.system.NativeStart.main (Native Method)
I do not know how to write Query
public interface ApiInterface { @POST("?act=register&email={email}&fullname={fullname}&password={pas}") Call<RegResponse> register(@Query ("email") String email , @Query("fullname") String fullname , @Query("pas") String password); } String name = mSignUpName.getText().toString(); String pass = mSignUpPasswordView.getText().toString(); email = mSignUpEmailView.getText().toString(); ApiInterface apiInterface = ApiClient.getClient().create(ApiInterface.class); Call<RegResponse> call = apiInterface.register(name,email,pass); call.enqueue(new Callback<RegResponse>() { @Override public void onResponse(Call<RegResponse> call, Response<RegResponse> response) { showProgress(false); Log.d("Log","True"); } @Override public void onFailure(Call<RegResponse> call, Throwable t) { showProgress(false); Log.d("Log","Error" + t.getMessage()); } });