public class BaseRestUtils extends BaseValidationUtils
Constructor and Description |
---|
BaseRestUtils() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
addAuthorizeHeader(String userName,
String password) |
static String |
encodeUrlForDownload(String url) |
protected static Map<String,String> |
prepareHeadersMap(String userId) |
protected static Map<String,String> |
prepareHeadersMap(String userId,
String accept) |
protected static RestResponse |
sendDelete(String url,
String userId) |
protected static RestResponse |
sendGet(String url,
String userId) |
protected static RestResponse |
sendGet(String url,
String userId,
Map<String,String> additionalHeaders) |
static RestResponse |
sendGetAndRemoveHeaders(String url,
String userId,
List<String> headersToRemove) |
protected static RestResponse |
sendPost(String url,
org.apache.http.HttpEntity entity,
String userId,
String accept) |
static RestResponse |
sendPost(String url,
String userBodyJson,
String userId,
String accept) |
protected static RestResponse |
sendPost(String url,
String userBodyJson,
String userId,
String accept,
Map<String,String> additionalHeaders) |
protected static RestResponse |
sendPut(String url,
String userBodyJson,
String userId,
String cont) |
checkCreateResponse, checkDeleteResponse, checkErrorCode, checkErrorMessageResponse, checkErrorResponse, checkStatusCode, checkSuccess
public static final String contentTypeHeaderData
public static final String acceptHeaderData
public static final String acceptJsonHeader
public static final String acceptOctetHeader
public static final String authorizationHeader
public static final String acceptOctetStream
public static final String ecomp
public static final String authorizationPrefixString
public static final String RESOURCE_COMPONENT_TYPE
public static final String PRODUCT_COMPONENT_TYPE
public static final String SERVICE_COMPONENT_TYPE
public static final int STATUS_CODE_SUCCESS
public static final int STATUS_CODE_CREATED
public static final int STATUS_CODE_DELETE
public static final int STATUS_CODE_NOT_FOUND
public static final int STATUS_CODE_SUCCESS_NO_CONTENT
public static final int STATUS_CODE_SUCCESS_DELETE
public static final int STATUS_CODE_INVALID_CONTENT
public static final int STATUS_CODE_MISSING_DATA
public static final int STATUS_CODE_MISSING_INFORMATION
public static final int STATUS_CODE_RESTRICTED_ACCESS
public static final int STATUS_CODE_ALREADY_EXISTS
public static final int STATUS_CODE_RESTRICTED_OPERATION
public static final int STATUS_CODE_COMPONENT_NAME_EXCEEDS_LIMIT
public static final int STATUS_CODE_MISSING_COMPONENT_NAME
public static final int STATUS_CODE_UNSUPPORTED_ERROR
public static final int STATUS_CODE_IMPORT_SUCCESS
public static final int STATUS_CODE_UPDATE_SUCCESS
public static final int RESTRICTED_OPERATION
public static final int STATUS_CODE_GET_SUCCESS
public static final String SUCCESS_MESSAGE
protected static Map<String,String> prepareHeadersMap(String userId, String accept)
protected static RestResponse sendGet(String url, String userId) throws IOException
IOException
protected static RestResponse sendGet(String url, String userId, Map<String,String> additionalHeaders) throws IOException
IOException
public static RestResponse sendGetAndRemoveHeaders(String url, String userId, List<String> headersToRemove) throws IOException
IOException
protected static RestResponse sendPut(String url, String userBodyJson, String userId, String cont) throws IOException
IOException
public static RestResponse sendPost(String url, String userBodyJson, String userId, String accept) throws IOException
IOException
protected static RestResponse sendPost(String url, String userBodyJson, String userId, String accept, Map<String,String> additionalHeaders) throws IOException
IOException
protected static RestResponse sendPost(String url, org.apache.http.HttpEntity entity, String userId, String accept) throws IOException
IOException
protected static RestResponse sendDelete(String url, String userId) throws IOException
IOException
Copyright © 2017. All rights reserved.