alex-sherwin / missing-link

Simple ant http plugin
0 stars 1 forks source link

Setting printrequestheaders and printresponseheaders to false doesn't do anything. #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The following should output just the body of the HTTP response:

    <http url="http://domain/etc"
        entityProperty       = "HttpResponse"
        failonunexpected     = "false"
        printrequestheaders  = "false"
        printresponseheaders = "false"
        />
    <echo>${HttpResponse}</echo>

Instead, it is preceeding the echo with:

     [http] HTTP Request
     [http] ********************
     [http] URL:        http://domain/etc
     [http] Method:     GET
     [http] HTTP Response
     [http] ********************
     [http] Status:     200

Which is clogging up the output.

Using missing-link 1.1.3 with Ant 1.8.2

Original issue reported on code.google.com by bought...@gmail.com on 8 Jan 2012 at 8:07

GoogleCodeExporter commented 8 years ago
I have an authentication token in the header and I would prefer it not being 
sent to std out

Original comment by supert...@gmail.com on 4 May 2014 at 8:51

GoogleCodeExporter commented 8 years ago
Looking at the source it seems you already have accounted for this except the 
if statement @ line 283 in HttpClientTask.java

 if (httpClient.getHeaders().size() > 0 && printRequestHeaders) {

Great library by the way.. Thanks !

Original comment by supert...@gmail.com on 4 May 2014 at 8:55