Subversion Repositories SmartDukaan

Rev

Rev 22215 | Rev 22337 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22215 Rev 22233
Line 71... Line 71...
71
		for(Map.Entry<String, String> entry : headers.entrySet()){
71
		for(Map.Entry<String, String> entry : headers.entrySet()){
72
			request.setHeader(entry.getKey(), entry.getValue());
72
			request.setHeader(entry.getKey(), entry.getValue());
73
		}
73
		}
74
		return this.execute(request);
74
		return this.execute(request);
75
	}
75
	}
-
 
76
 
-
 
77
	public String get(String uri, Map<String, String> params)
-
 
78
			throws ProfitMandiBusinessException{
-
 
79
		UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url + uri);
-
 
80
		Set<String> keys = params.keySet();
-
 
81
		for(String key : keys){
-
 
82
			builder.queryParam(key, params.get(key));
-
 
83
		}
-
 
84
		HttpGet request = new HttpGet(builder.build().toUri());
-
 
85
		return this.execute(request);
-
 
86
	}
76
	
87
	
77
	public String execute(HttpUriRequest request)
88
	public String execute(HttpUriRequest request)
78
			throws ProfitMandiBusinessException{
89
			throws ProfitMandiBusinessException{
79
		LOGGER.info("Connecting to server at url {}",request.getURI());
90
		LOGGER.info("Connecting to server at url {}",request.getURI());
80
		try {
91
		try {