/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * Start a 'PUT' 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 put(final CharSequence baseUrl, final boolean encode, final Object... params) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); }
/** * This method upload the deployment model in the monitoring manager * * @param model the state of the deployment */ public void uploadDeployment(Model model){ String url = address + "/" + version + "/model/resources"; int result; Gson gson = new GsonBuilder().serializeNulls().create(); String json = gson.toJson(model); try { journal.log(Level.INFO, ">> Connecting to the monitoring platform at "+address+"..."); result = HttpRequest.put(url).send(json).code(); printComponentname(model); } catch (Exception e) { result = 0; } printResult(result); }
public Response put() { HttpRequest request = HttpRequest.put( url ); addContentType( request ); addHeaders( request ); addAuthentication( request ); request.send( content ); sendRequest( request ); return new ResponseImpl( request ); }