Package io.karatelabs.http
Class ApacheHttpClient
java.lang.Object
io.karatelabs.http.ApacheHttpClient
- All Implemented Interfaces:
HttpClient,Closeable,AutoCloseable,org.apache.hc.core5.http.HttpRequestInterceptor
public class ApacheHttpClient
extends Object
implements HttpClient, org.apache.hc.core5.http.HttpRequestInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidapply(KarateConfig config) Apply a typed configuration snapshot.voidclose()invoke(HttpRequest request) voidprocess(org.apache.hc.core5.http.HttpRequest hr, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context)
-
Constructor Details
-
ApacheHttpClient
public ApacheHttpClient()
-
-
Method Details
-
apply
Description copied from interface:HttpClientApply a typed configuration snapshot.KarateConfigis the single source of truth — implementations read every relevant setting via its typed getters and (re)build their internal client state.- Specified by:
applyin interfaceHttpClient
-
invoke
- Specified by:
invokein interfaceHttpClient
-
abort
public void abort()- Specified by:
abortin interfaceHttpClient
-
process
public void process(org.apache.hc.core5.http.HttpRequest hr, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context) - Specified by:
processin interfaceorg.apache.hc.core5.http.HttpRequestInterceptor
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-