public class HttpUrlConnectionTransport extends Object implements Transport
HttpURLConnection
transport.Transport.TransportException
Constructor and Description |
---|
HttpUrlConnectionTransport(UserAgentSupplier userAgent) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected HttpURLConnection |
connect(URL url)
Return connection for URL; customize as needed.
|
void |
init(OssindexClientConfiguration configuration)
Initialize transport.
|
protected Proxy |
maybeCreateProxy(OssindexClientConfiguration configuration)
Maybe create a proxy if configured.
|
String |
post(URI url,
String payloadType,
String payload,
String acceptType)
Perform HTTP POST request.
|
public HttpUrlConnectionTransport(UserAgentSupplier userAgent)
public void init(OssindexClientConfiguration configuration)
Transport
public void close() throws Exception
close
in interface AutoCloseable
Exception
public String post(URI url, String payloadType, String payload, String acceptType) throws Transport.TransportException, IOException
Transport
post
in interface Transport
Transport.TransportException
IOException
protected HttpURLConnection connect(URL url) throws IOException
IOException
@Nullable protected Proxy maybeCreateProxy(OssindexClientConfiguration configuration)
Copyright © 2018–2022 Sonatype, Inc.. All rights reserved.