HTTPConnection conn method
setRequestProperty
conn.setRequestProperty("","");
I have different header for different URL. So, it's not fix in my project. I need to use a array to fill the setRequestproperty data.
Individual call for setRequestProperty it's working 1stPart .
I tried to call same into Array it's not work "part 2".
1) conn.setRequestProperty("Authorization","12345678");
conn.setRequestProperty("ReToken", "erjeorjeorjeoureorjr");
2)
String[] array1 = new String[]{"Authorization","12345678","RefreshToken","erjeorjeorjeoureorjr"};`
if (array1 != null) {
int size = array1.length;
for (int i = 0; i < size; i = i + 2) {
conn.setRequestProperty('"' + array1[i] + '"',
'"' + array1[i + 1] + '"');
Log.d(TAG,"Value Print:: " + array1[i] + " ," +
array1[i+1] );
}
}