/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param params The query parameters to include as part of the baseUrl * @param encode true to encode the full URL * @return request * @see #append(CharSequence, Map) * @see #encode(CharSequence) */ public static HttpRequest delete(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * This method tells to the monitoring manager which instances must be removed * from the deployment model * * @param id are the IDs of the instances to be deleted * @return int code status of the connection */ public int deleteInstances(String id){ String url = address + "/" + version + "/model/resources/" + id; int result; try { journal.log(Level.INFO, ">> Connecting to the monitoring platform at "+address+"..."); result = HttpRequest.delete(url).code(); } catch (Exception e) { result = NO_RESPONSE; } printResult(result); return result; }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param params * The query parameters to include as part of the baseUrl * @param encode * true to encode the full URL * * @see #append(CharSequence, Map) * @see #encode(CharSequence) * * @return request */ public static HttpRequest delete(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param encode true to encode the full URL * @param params the name/value query parameter pairs to include as part of the * baseUrl * @return request * @see #append(CharSequence, String...) * @see #encode(CharSequence) */ public static HttpRequest delete(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param encode * true to encode the full URL * @param params * the name/value query parameter pairs to include as part of the * baseUrl * * @see #append(CharSequence, Object...) * @see #encode(CharSequence) * * @return request */ public static HttpRequest delete(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param encode * true to encode the full URL * @param params * the name/value query parameter pairs to include as part of the * baseUrl * * @see #append(CharSequence, String...) * @see #encode(CharSequence) * * @return request */ public static HttpRequest delete(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param params * The query parameters to include as part of the baseUrl * @param encode * true to encode the full URL * * @see #append(CharSequence, Map) * @see #encode(CharSequence) * * @return request */ public static HttpRequest delete(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param params * The query parameters to include as part of the baseUrl * @param encode * true to encode the full URL * * @see #append(CharSequence, Map) * @see #encode(CharSequence) * * @return request */ public static HttpRequest delete(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
/** * Start a 'DELETE' request to the given URL along with the query params * * @param baseUrl * @param encode * true to encode the full URL * @param params * the name/value query parameter pairs to include as part of the * baseUrl * * @see #append(CharSequence, Object...) * @see #encode(CharSequence) * * @return request */ public static HttpRequest delete(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return delete(encode ? encode(url) : url); }
public Response delete() { HttpRequest request = HttpRequest.delete( url ); addContentType( request ); addHeaders( request ); addAuthentication( request ); sendRequest( request ); return new ResponseImpl( request ); }