0

My code is:

 @FormUrlEncoded

 @POST("/api/userlogin")

 void getUserLogin(@Query("client_id")String  id,@Query("client_secret")String  secret,@Query("username")String  uname, @Body HashMap<String, String> arguments, Callback<LoginResult> cb);

This gives error please help..

Vikram Biwal
  • 2,618
  • 1
  • 25
  • 36
  • What's the error you are getting ? – Riten Aug 09 '16 at 12:28
  • retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ – Vikram Biwal Aug 09 '16 at 12:54
  • may be it can help you ... [http://stackoverflow.com/questions/36177629/retrofit2-android-expected-begin-array-but-was-begin-object-at-line-1-column-2](http://stackoverflow.com/questions/36177629/retrofit2-android-expected-begin-array-but-was-begin-object-at-line-1-column-2) – Riten Aug 10 '16 at 03:57

1 Answers1

1

Chage in @Body :

@Body TypedInput arguments

for more:

How to POST raw whole JSON in the body of a Retrofit request?

Community
  • 1
  • 1