public Request createGetRequest(String url, String apiKey, String accessToken) {
        HttpUrl.Builder httpBuilder = HttpUrl.parse(url).newBuilder();
        return new Request.Builder().url(httpBuilder.build()).header("User-Agent", USER_AGENT).header("X-Kite-Version", "3").header("Authorization", "token "+apiKey+":"+accessToken).build();
    }
public Request createGetRequest ( String url , String apiKey , String accessToken ) { HttpUrl . Builder httpBuilder = HttpUrl . parse ( url ) . newBuilder ( ) ; return new Request . Builder ( ) . url ( httpBuilder . build ( ) ) . header ( "User-Agent" , USER_AGENT ) . header ( "X-Kite-Version" , "3" ) . header ( "Authorization" , "token " + apiKey + ":" + accessToken ) . build ( ) ; }
Creates a GET request.
@param url is the endpoint to which request has to be done.
@param apiKey is the api key of the Kite Connect app.
@param accessToken is the access token obtained after successful login process.