File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
sdk-java/src/main/java/ly/count/sdk/java Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,12 @@ public class Config {
230230 */
231231 protected boolean unhandledCrashReportingEnabled = true ;
232232
233+ /**
234+ * Custom network request headers to be sent with each request.
235+ * If you want to add a header, use {@link #addCustomNetworkRequestHeaders(Map)}.
236+ */
237+ protected Map <String , String > customNetworkRequestHeaders = null ;
238+
233239 public ConfigViews views = new ConfigViews (this );
234240
235241 protected String location = null ;
@@ -1330,6 +1336,20 @@ public Config disableLocation() {
13301336 return this ;
13311337 }
13321338
1339+ /**
1340+ * Allows you to add custom header key/value pairs to each request
1341+ *
1342+ * @return Returns the same config object for convenient linking
1343+ */
1344+ public Config addCustomNetworkRequestHeaders (Map <String , String > customHeaderValues ) {
1345+ this .customNetworkRequestHeaders = customHeaderValues ;
1346+ return this ;
1347+ }
1348+
1349+ public Map <String , String > getCustomNetworkRequestHeaders () {
1350+ return customNetworkRequestHeaders ;
1351+ }
1352+
13331353 /**
13341354 * Logging level for {@link Log} module
13351355 */
You can’t perform that action at this time.
0 commit comments