All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.axway.apim.actions.rest.GETRequest Maven / Gradle / Ivy

package com.axway.apim.actions.rest;

import java.net.URI;

import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;

import com.axway.apim.actions.tasks.IResponseParser;
import com.axway.apim.lib.AppException;

public class GETRequest extends RestAPICall {

	public GETRequest(URI uri, IResponseParser responseParser) {
		super(null, uri,responseParser);
	}
	
	public GETRequest(URI uri, IResponseParser responseParser, boolean useAdmin) {
		super(null, uri,responseParser, useAdmin);
	}

	@Override
	public HttpResponse execute() throws AppException {
		HttpGet httpGet = new HttpGet(uri);
		httpGet.setHeader("Content-type", this.contentType);
		HttpResponse response = sendRequest(httpGet);
		parseResponse(response);
		return response;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy