Package jenkins.plugins.http_request
Class ResponseContentSupplier
- java.lang.Object
-
- jenkins.plugins.http_request.ResponseContentSupplier
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
public class ResponseContentSupplier extends Object implements Serializable, AutoCloseable
A container for the Http Response. The container is returned as is to the Pipeline. For the normal plugin, the container is consumed internally (since it cannot be returned).- Author:
- Martin d'Anjou
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResponseContentSupplier(String content, int status)
ResponseContentSupplier(ResponseHandle responseHandle, org.apache.http.HttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
getCharset()
String
getContent()
InputStream
getContentStream()
Map<String,List<String>>
getHeaders()
int
getStatus()
String
toString()
-
-
-
Constructor Detail
-
ResponseContentSupplier
public ResponseContentSupplier(String content, int status)
-
ResponseContentSupplier
public ResponseContentSupplier(ResponseHandle responseHandle, org.apache.http.HttpResponse response)
-
-
Method Detail
-
getStatus
public int getStatus()
-
getCharset
public String getCharset()
-
getContent
public String getContent()
-
getContentStream
public InputStream getContentStream()
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
-