You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: This is working perfectly I was misslead by the backend response, please dont take this in consideration. Thanks for your time and sorry for such naive mistake.
I want to add multiple params on the interceptor, for some reason the only param added is the first, this is my code:
public MyService getService(Context context){
String SESSION_KEY = 109huj1293u2;
String DEVICE_ID = 10293ud1312a;
String TIME_STAMP = 123451;
MyService service = new Wasp.Builder(context).setEndpoint("http://someurl.com/api").setRequestInterceptor(new RequestInterceptor() {
@Override
public void onHeadersAdded(Map<String, String> headers) {
}
@Override
public void onQueryParamsAdded(Map<String, Object> params) {
//HERE IS MY PROBLEM, only SESSION_KEY is working
params.put("session_key",SESSION_KEY);
params.put("timestamp", TIME_STAMP);
params.put("device_id", DEVICE_ID);
}
@Override
public WaspRetryPolicy getRetryPolicy() {
return null;
}
@Override
public AuthToken getAuthToken() {
return null;
}
}).build().create(MyService.class);
return service;
}
I have trimmed down some of the code, but I think this should be enough. I know this is working cause if I use a rest manager (by example a G. Chrome extension) works fine.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
cutiko
changed the title
How to add multiple params on interceptors onQueryParamsAdded
How to add multiple params on interceptors onQueryParamsAdded (solved)
Dec 31, 2015
EDIT:
This is working perfectly I was misslead by the backend response, please dont take this in consideration. Thanks for your time and sorry for such naive mistake.
I want to add multiple params on the interceptor, for some reason the only param added is the first, this is my code:
I have trimmed down some of the code, but I think this should be enough. I know this is working cause if I use a rest manager (by example a G. Chrome extension) works fine.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: