File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
sdk-java/src/main/java/ly/count/sdk/java/internal Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,18 @@ HttpURLConnection connection(final Request request) throws IOException {
149149 https .setSSLSocketFactory (sslContext .getSocketFactory ());
150150 }
151151
152+ if (config .getCustomNetworkRequestHeaders () != null ) {
153+ //if there are custom header values, add them
154+ L .v ("[Transport] connection, Adding [" + config .getCustomNetworkRequestHeaders () + "] custom header fields" );
155+ for (Map .Entry <String , String > entry : config .getCustomNetworkRequestHeaders ().entrySet ()) {
156+ String key = entry .getKey ();
157+ String value = entry .getValue ();
158+ if (key != null && value != null && !key .isEmpty ()) {
159+ connection .addRequestProperty (key , value );
160+ }
161+ }
162+ }
163+
152164 if (!usingGET ) {
153165 OutputStream output = null ;
154166 PrintWriter writer = null ;
You can’t perform that action at this time.
0 commit comments