private static Response getApiResponse(Verbs verb, String methodName, Map<String, String> params) throws IOException {
    """
	Get response from Instagram.
	
	@param verb HTTP Verb
	@param methodName Instagram API Method
	@param params parameters which would be sent with the request.
	@return Response object.
    """
        Response response;
        String apiResourceUrl = Constants.OEMBED_URL + methodName;
        OAuthRequest request = new OAuthRequest(verb, apiResourceUrl);

        // Additional parameters in url
        if (params != null) {
            for (Map.Entry<String, String> entry : params.entrySet()) {
                if (verb == Verbs.GET) {
                    request.addQuerystringParameter(entry.getKey(), entry.getValue());
                } else {
                    request.addBodyParameter(entry.getKey(), entry.getValue());
                }
            }
        }

        response = request.send();

        return response;
    }
private static Response getApiResponse(Verbs verb, String methodName, Map<String, String> params) throws IOException {
        Response response;
        String apiResourceUrl = Constants.OEMBED_URL + methodName;
        OAuthRequest request = new OAuthRequest(verb, apiResourceUrl);

        // Additional parameters in url
        if (params != null) {
            for (Map.Entry<String, String> entry : params.entrySet()) {
                if (verb == Verbs.GET) {
                    request.addQuerystringParameter(entry.getKey(), entry.getValue());
                } else {
                    request.addBodyParameter(entry.getKey(), entry.getValue());
                }
            }
        }

        response = request.send();

        return response;
    }
private static Response getApiResponse ( Verbs verb , String methodName , Map < String , String > params ) throws IOException { Response response ; String apiResourceUrl = Constants . OEMBED_URL + methodName ; OAuthRequest request = new OAuthRequest ( verb , apiResourceUrl ) ; // Additional parameters in url if ( params != null ) { for ( Map . Entry < String , String > entry : params . entrySet ( ) ) { if ( verb == Verbs . GET ) { request . addQuerystringParameter ( entry . getKey ( ) , entry . getValue ( ) ) ; } else { request . addBodyParameter ( entry . getKey ( ) , entry . getValue ( ) ) ; } } } response = request . send ( ) ; return response ; }
Get response from Instagram.

@param verb HTTP Verb
@param methodName Instagram API Method
@param params parameters which would be sent with the request.
@return Response object.
Get response from Instagram .