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)
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 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.