/** * Sends an HTTP request based on the current builder configuration. If no * request headers have been set, the header "Content-Type" will be used with * a value of "text/plain; charset=utf-8". You must call * {@link #setRequestData(String)} and {@link #setCallback(RequestCallback)} * before calling this method. * * @return a {@link Request} object that can be used to track the request * @throws RequestException if the call fails to initiate * @throws NullPointerException if a request callback has not been set */ public Request send() throws RequestException { StringValidator.throwIfNull("callback", callback); return doSend(requestData, callback); }
/** * Sends an HTTP request based on the current builder configuration with the * specified data and callback. If no request headers have been set, the * header "Content-Type" will be used with a value of "text/plain; * charset=utf-8". This method does not cache <code>requestData</code> or * <code>callback</code>. * * @param requestData the data to send as part of the request * @param callback the response handler to be notified when the request fails * or completes * @return a {@link Request} object that can be used to track the request * @throws NullPointerException if <code>callback</code> <code>null</code> */ public Request sendRequest(String requestData, RequestCallback callback) throws RequestException { StringValidator.throwIfNull("callback", callback); return doSend(requestData, callback); }
/** * Sends an HTTP request based on the current builder configuration. If no * request headers have been set, the header "Content-Type" will be used with * a value of "text/plain; charset=utf-8". You must call * {@link #setRequestData(String)} and {@link #setCallback(RequestCallback)} * before calling this method. * * @return a {@link Request} object that can be used to track the request * @throws RequestException if the call fails to initiate * @throws NullPointerException if a request callback has not been set */ public Request send() throws RequestException { StringValidator.throwIfNull("callback", callback); return doSend(requestData, callback); }
/** * Sends an HTTP request based on the current builder configuration. If no * request headers have been set, the header "Content-Type" will be used with * a value of "text/plain; charset=utf-8". You must call * {@link #setRequestData(String)} and {@link #setCallback(RequestCallback)} * before calling this method. * * @return a {@link Request} object that can be used to track the request * @throws RequestException if the call fails to initiate * @throws NullPointerException if a request callback has not been set */ public Request send() throws RequestException { StringValidator.throwIfNull("callback", callback); return doSend(requestData, callback); }
/** * Sends an HTTP request based on the current builder configuration with the * specified data and callback. If no request headers have been set, the * header "Content-Type" will be used with a value of "text/plain; * charset=utf-8". This method does not cache <code>requestData</code> or * <code>callback</code>. * * @param requestData the data to send as part of the request * @param callback the response handler to be notified when the request fails * or completes * @return a {@link Request} object that can be used to track the request * @throws NullPointerException if <code>callback</code> <code>null</code> */ public Request sendRequest(String requestData, RequestCallback callback) throws RequestException { StringValidator.throwIfNull("callback", callback); return doSend(requestData, callback); }
/** * Sends an HTTP request based on the current builder configuration with the * specified data and callback. If no request headers have been set, the * header "Content-Type" will be used with a value of "text/plain; * charset=utf-8". This method does not cache <code>requestData</code> or * <code>callback</code>. * * @param requestData the data to send as part of the request * @param callback the response handler to be notified when the request fails * or completes * @return a {@link Request} object that can be used to track the request * @throws NullPointerException if <code>callback</code> <code>null</code> */ public Request sendRequest(String requestData, RequestCallback callback) throws RequestException { StringValidator.throwIfNull("callback", callback); return doSend(requestData, callback); }