There is a URL to get the data: http://ps1722.weeteam.net/api/products?display=[name,desc, id_default_image,price,reference_&limit=20
Authorization - Basic:
login: XHKM6A6BLCA5MNYZQBX2GXBAAKSTPMK2
password: no password
Basic encoding method:
public static String getAuthToken() { byte[] data = new byte[0]; try { data = ("login" + ":" + "password").getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return "Basic " + Base64.encodeToString(data, Base64.NO_WRAP); } How to get data by reference.
I use Retrofit2:
public interface APIService { @GET("api/productsdisplay=[name,description,id_default_image,price,reference]&limit=20") Call<ResponseBody> callBack (@Header("Authorization") String credential); }