Aggiunto deposito reale nell'header di ogni richiesta
This commit is contained in:
parent
809ef43445
commit
e025b234a7
2
.idea/runConfigurations/app.xml
generated
2
.idea/runConfigurations/app.xml
generated
@ -1,6 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app" type="AndroidRunConfigurationType" factoryName="Android App">
|
||||
<module name="WMS_Native.app" />
|
||||
<module name="WMS.app" />
|
||||
<option name="ANDROID_RUN_CONFIGURATION_SCHEMA_VERSION" value="1" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
|
||||
|
||||
@ -30,11 +30,17 @@ public class HttpInterceptor implements Interceptor {
|
||||
HttpUrl url = urlBuilder.build();
|
||||
|
||||
final Request.Builder requestBuilder = chain.request().newBuilder();
|
||||
|
||||
Request.Builder builder = requestBuilder
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.addHeader("Accept", "*/*")
|
||||
.addHeader("x-app-token", APP_TOKEN);
|
||||
|
||||
if (SettingsManager.i().getUserSession() != null &&
|
||||
SettingsManager.i().getUserSession().getDepo() != null &&
|
||||
!UtilityString.isNullOrEmpty(SettingsManager.i().getUserSession().getDepo().getCodMdep()))
|
||||
builder.addHeader("codMdep", SettingsManager.i().getUserSession().getDepo().getCodMdep());
|
||||
|
||||
var newRequest = builder
|
||||
.url(url)
|
||||
.build();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user