You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Bashiro <ba...@myway.com> on 2007/12/11 19:54:19 UTC

HttpClient Headers

Good day,

When I send a request;
i get the following headers in addition to what i am expecting

"
Dec 11, 2007 7:47:51 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Dec 11, 2007 7:47:51 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseAsStream instead is recommended."

How do I remove the debug headers above;
example, how do I change the apache to my client name, and how do I 


Thanks
Bashiro

 

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way  your home on the Web - http://www.myway.com



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: HttpClient Headers

Posted by Roland Weber <os...@dubioso.net>.
Hello Bashiro,

> Dec 11, 2007 7:47:51 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
> INFO: basic authentication scheme selected
> Dec 11, 2007 7:47:51 PM org.apache.commons.httpclient.HttpMethodBase getResponseBody
> WARNING: Going to buffer response body of large or unknown size. Using getResponseAsStream instead is recommended.
> 
> How do I remove the debug headers above;

These are not headers, these are debug messages. Or rather
one INFO and one WARNING message. You can get rid of the
INFO message by configuring your logging framework properly.
See our logging guide for pointers, and the documentation
of your logging framework for details:
http://jakarta.apache.org/httpcomponents/httpclient-3.x/logging.html

You could get rid of the warning by configuring the logging
framework too, but I wouldn't recommend that. Either do as
the message tells you and don't call getResponseBody, or
configure the warning limit properly:

http://jakarta.apache.org/httpcomponents/httpclient-3.x/preference-api.html
http://jakarta.apache.org/httpcomponents/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpMethodParams.html#BUFFER_WARN_TRIGGER_LIMIT

> example, how do I change the apache to my client name, and how do I 

What does that have to do with the log output above?
You can change some header values by setting them before
executing the method. You can change the user-agent
header value by setting a parameter:

http://jakarta.apache.org/httpcomponents/httpclient-3.x/preference-api.html
http://jakarta.apache.org/httpcomponents/httpclient-3.x/apidocs/org/apache/commons/httpclient/params/HttpMethodParams.html#USER_AGENT

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org