public class HttpClientTransport extends Object implements Transport
HttpClient transport.Transport.TransportException| Constructor and Description |
|---|
HttpClientTransport(UserAgentSupplier userAgent) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected org.apache.http.impl.client.CloseableHttpClient |
createClient()
Create customized client.
|
protected void |
customize(org.apache.http.client.methods.HttpPost request)
Customize request.
|
void |
init(OssindexClientConfiguration configuration)
Initialize transport.
|
String |
post(URI url,
String payloadType,
String payload,
String acceptType)
Perform HTTP POST request.
|
public HttpClientTransport(UserAgentSupplier userAgent)
public void init(OssindexClientConfiguration configuration)
Transportpublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic String post(URI url, String payloadType, String payload, String acceptType) throws Transport.TransportException, IOException
Transportpost in interface TransportTransport.TransportExceptionIOExceptionprotected org.apache.http.impl.client.CloseableHttpClient createClient()
protected void customize(org.apache.http.client.methods.HttpPost request)
Copyright © 2018–2022 Sonatype, Inc.. All rights reserved.