LOG.trace("enter MultipartPostMethod.addRequestHeaders(HttpState state, " + "HttpConnection conn)"); super.addRequestHeaders(state, conn); addContentLengthRequestHeader(state, conn); addContentTypeRequestHeader(state, conn);
boolean headerPresent = (getRequestHeader("Expect") != null); if (getParams().isParameterTrue(HttpMethodParams.USE_EXPECT_CONTINUE) && getEffectiveVersion().greaterEquals(HttpVersion.HTTP_1_1) && hasRequestContent()) setRequestHeader("Expect", "100-continue"); removeRequestHeader("Expect");
/** * Returns the request's charset. The charset is parsed from the request entity's * content type, unless the content type header has been set manually. * * @see RequestEntity#getContentType() * * @since 3.0 */ public String getRequestCharSet() { if (getRequestHeader("Content-Type") == null) { // check the content type from request entity // We can't call getRequestEntity() since it will probably call // this method. if (this.requestEntity != null) { return getContentCharSet( new Header("Content-Type", requestEntity.getContentType())); } else { return super.getRequestCharSet(); } } else { return super.getRequestCharSet(); } }
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { LOG.trace("enter MultipartPostMethod.recycle()"); super.recycle(); parameters.clear(); } }
/** * <p> * Returns <tt>true</tt> if the 'Expect: 100-Continue' handshake * is activated. The purpose of the 'Expect: 100-Continue' * handshake to allow a client that is sending a request message * with a request body to determine if the origin server is * willing to accept the request (based on the request headers) * before the client sends the request body. * </p> * * @return <tt>true</tt> if 'Expect: 100-Continue' handshake is to * be used, <tt>false</tt> otherwise. * * @since 2.0beta1 * * @deprecated Use {@link HttpMethodParams} * * @see #getParams() * @see HttpMethodParams * @see HttpMethodParams#USE_EXPECT_CONTINUE */ public boolean getUseExpectHeader() { return getParams().getBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, false); }
/** * Entity enclosing requests cannot be redirected without user intervention * according to RFC 2616. * * @param followRedirects must always be <code>false</code> */ public void setFollowRedirects(boolean followRedirects) { if (followRedirects == true) { throw new IllegalArgumentException("Entity enclosing requests cannot be redirected without user intervention"); } super.setFollowRedirects(false); }
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { LOG.trace("enter EntityEnclosingMethod.recycle()"); clearRequestBody(); this.requestContentLength = InputStreamRequestEntity.CONTENT_LENGTH_AUTO; this.repeatCount = 0; this.chunked = false; super.recycle(); }
getParams().setBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, value);
/** * Entity enclosing requests cannot be redirected without user intervention * according to RFC 2616. * * @param followRedirects must always be <code>false</code> */ public void setFollowRedirects(boolean followRedirects) { if (followRedirects == true) { throw new IllegalArgumentException("Entity enclosing requests cannot be redirected without user intervention"); } super.setFollowRedirects(false); }
boolean headerPresent = (getRequestHeader("Expect") != null); if (getParams().isParameterTrue(HttpMethodParams.USE_EXPECT_CONTINUE) && getEffectiveVersion().greaterEquals(HttpVersion.HTTP_1_1) && hasRequestContent()) setRequestHeader("Expect", "100-continue"); removeRequestHeader("Expect");
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { LOG.trace("enter MultipartPostMethod.recycle()"); super.recycle(); parameters.clear(); } }
/** * <p> * Returns <tt>true</tt> if the 'Expect: 100-Continue' handshake * is activated. The purpose of the 'Expect: 100-Continue' * handshake to allow a client that is sending a request message * with a request body to determine if the origin server is * willing to accept the request (based on the request headers) * before the client sends the request body. * </p> * * @return <tt>true</tt> if 'Expect: 100-Continue' handshake is to * be used, <tt>false</tt> otherwise. * * @since 2.0beta1 * * @deprecated Use {@link HttpMethodParams} * * @see #getParams() * @see HttpMethodParams * @see HttpMethodParams#USE_EXPECT_CONTINUE */ public boolean getUseExpectHeader() { return getParams().getBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, false); }
+ "HttpConnection)"); super.addRequestHeaders(state, conn); addContentLengthRequestHeader(state, conn);
/** * Entity enclosing requests cannot be redirected without user intervention * according to RFC 2616. * * @param followRedirects must always be <code>false</code> */ public void setFollowRedirects(boolean followRedirects) { if (followRedirects == true) { throw new IllegalArgumentException("Entity enclosing requests cannot be redirected without user intervention"); } super.setFollowRedirects(false); }
/** * Returns the request's charset. The charset is parsed from the request entity's * content type, unless the content type header has been set manually. * * @see RequestEntity#getContentType() * * @since 3.0 */ public String getRequestCharSet() { if (getRequestHeader("Content-Type") == null) { // check the content type from request entity // We can't call getRequestEntity() since it will probably call // this method. if (this.requestEntity != null) { return getContentCharSet( new Header("Content-Type", requestEntity.getContentType())); } else { return super.getRequestCharSet(); } } else { return super.getRequestCharSet(); } }
boolean headerPresent = (getRequestHeader("Expect") != null); if (getParams().isParameterTrue(HttpMethodParams.USE_EXPECT_CONTINUE) && getEffectiveVersion().greaterEquals(HttpVersion.HTTP_1_1) && hasRequestContent()) setRequestHeader("Expect", "100-continue"); removeRequestHeader("Expect");
/** * Recycles the HTTP method so that it can be used again. * Note that all of the instance variables will be reset * once this method has been called. This method will also * release the connection being used by this HTTP method. * * @see #releaseConnection() * * @deprecated no longer supported and will be removed in the future * version of HttpClient */ public void recycle() { LOG.trace("enter MultipartPostMethod.recycle()"); super.recycle(); parameters.clear(); } }
/** * <p> * Returns <tt>true</tt> if the 'Expect: 100-Continue' handshake * is activated. The purpose of the 'Expect: 100-Continue' * handshake to allow a client that is sending a request message * with a request body to determine if the origin server is * willing to accept the request (based on the request headers) * before the client sends the request body. * </p> * * @return <tt>true</tt> if 'Expect: 100-Continue' handshake is to * be used, <tt>false</tt> otherwise. * * @since 2.0beta1 * * @deprecated Use {@link HttpMethodParams} * * @see #getParams() * @see HttpMethodParams * @see HttpMethodParams#USE_EXPECT_CONTINUE */ public boolean getUseExpectHeader() { return getParams().getBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, false); }
LOG.trace("enter MultipartPostMethod.addRequestHeaders(HttpState state, " + "HttpConnection conn)"); super.addRequestHeaders(state, conn); addContentLengthRequestHeader(state, conn); addContentTypeRequestHeader(state, conn);
/** * Entity enclosing requests cannot be redirected without user intervention * according to RFC 2616. * * @param followRedirects must always be <code>false</code> */ public void setFollowRedirects(boolean followRedirects) { if (followRedirects == true) { throw new IllegalArgumentException("Entity enclosing requests cannot be redirected without user intervention"); } super.setFollowRedirects(false); }