private String sendRequest(String endpoint, Map<String, String> params) {
		try {
			StringBuffer paramBuffer = new StringBuffer();
			Iterator<Map.Entry<String, String>> it = params.entrySet().iterator();
			while (it.hasNext()) {
				Map.Entry<String, String> pair = it.next();
				paramBuffer.append(URLEncoder.encode(pair.getKey(), "UTF-8") + "=" + URLEncoder.encode(pair.getValue(), "UTF-8"));
				if (it.hasNext()) paramBuffer.append("&");
			}
			String urlString = "http://yboss.yahooapis.com/ysearch/" + endpoint + "?" + paramBuffer;
			URL url = new URL(urlString);
			HttpURLConnection request = (HttpURLConnection) url.openConnection();
			consumer.sign(request);
			BufferedReader in = new BufferedReader(
			        new InputStreamReader(request.getInputStream()));
			String inputLine;
			StringBuffer response = new StringBuffer();
	 
			while ((inputLine = in.readLine()) != null) {
				response.append(inputLine);
			}
			return response.toString();
		}
		catch (MalformedURLException ex) {
			//Should never happen
		} catch (IOException e) {
			throw new BossException("IOException: " + e.getMessage());
		} catch (OAuthMessageSignerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (OAuthExpectationFailedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (OAuthCommunicationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		throw new BossException("Unspecified error");
	}