Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is the code that gets info from the database:
- ManagerAdminApi(String strApiUrl) {
- ApiUrl = strApiUrl;
- String BASE_URL = ApiUrl + "admin/";
- HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
- logging.setLevel(HttpLoggingInterceptor.Level.BODY);
- OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
- httpClient.addInterceptor(logging);
- Retrofit retrofit = new Retrofit.Builder()
- .baseUrl(BASE_URL)
- .addConverterFactory(GsonConverterFactory.create(new GsonBuilder().setLenient().create()))
- .client(httpClient.build())
- .build();
- service = retrofit.create(InterfaceAdminApi.class);
- }
- The expected behaviour is that I get information like this:
- [
- {
- "id": 1,
- "username": "admin",
- "password": "$2y$10$1h8jP8./G2bvlai3Prgwuu9fHHFsunerV0/aFo.JKKcWPh1MelyHy",
- "created": "2018-04-15T11:53:28-05:00",
- "midified": "2018-04-15T11:53:28-05:00",
- "grade": 4,
- "department": 5
- }
- ]
- It is currently returning a null value for each item
Advertisement
Add Comment
Please, Sign In to add comment