Package hudson.cli
Class FullDuplexHttpStream
java.lang.Object
hudson.cli.FullDuplexHttpStream
Creates a capacity-unlimited bi-directional
InputStream/OutputStream pair over
HTTP, which is a request/response protocol.
FullDuplexHttpService is the counterpart on the server side.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet data from the server.Upload data to the server.
-
Constructor Details
-
FullDuplexHttpStream
public FullDuplexHttpStream(URL base, String relativeTarget, String authorization) throws IOException - Parameters:
base- the base URL of Jenkins.relativeTarget- The endpoint that we are making requests to.authorization- The value of the authorization header.- Throws:
IOException
-
-
Method Details
-
getInputStream
Get data from the server. An initial zero byte is used as a handshake which you should expect and ignore. -
getOutputStream
Upload data to the server. You will need to write to this andOutputStream.flush()it to establish a connection.
-