Project

General

Profile

« Previous | Next » 

Revision 59841

added logs in debug to verify the header parameter in the basic authentication

View differences:

modules/dnet-collector-plugins/trunk/src/main/java/eu/dnetlib/data/collector/plugins/rest/RestIterator.java
261 261
	        	conn.setRequestProperty("Content-Type","application/json");
262 262
	        	conn.setRequestMethod("GET");
263 263
	        	theHttpInputStream = conn.getInputStream();
264
			}else if(this.authMethod == "basic"){
264
			}else if (this.authMethod == "basic") {
265 265
				log.trace("authMethod before inputStream: " + resultXml);
266

  
267 266
				HttpURLConnection conn = (HttpURLConnection) qUrl.openConnection();
268 267
				conn.setRequestProperty("Authorization","Basic "+authToken);
269 268
				conn.setRequestProperty("accept","application/xml");
270 269
				conn.setRequestMethod("GET");
270
				log.debug("header :" + conn.getHeaderFields());
271
				log.debug("url : " + qUrl.getPath());
271 272
				theHttpInputStream = conn.getInputStream();
272
			}
273
			else {
273
			} else {
274 274
				theHttpInputStream = qUrl.openStream();
275 275
			}
276 276
			

Also available in: Unified diff