Package com.intuit.karate.http
Class HttpUtils
- java.lang.Object
-
- com.intuit.karate.http.HttpUtils
-
public class HttpUtils extends Object
- Author:
- pthomas3
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddViaHeader(io.netty.handler.codec.http.HttpMessage msg, String alias)static io.netty.handler.codec.http.FullHttpResponseconnectionEstablished()static io.netty.handler.codec.http.FullHttpResponsecreateResponse(int status, String body)static io.netty.handler.codec.http.FullHttpResponsecreateResponse(io.netty.handler.codec.http.HttpResponseStatus status, String body)static voidcreateSelfSignedCertificate(File cert, File key)static voidfixHeadersForProxy(io.netty.handler.codec.http.HttpRequest request)static voidflushAndClose(io.netty.channel.Channel ch)static SSLContextgetSslContext(File keyStoreFile)static FileinitKeyStore(File keyStoreFile)static StringnormaliseUriPath(String uri)static CharsetparseContentTypeCharset(String mimeType)static Map<String,String>parseContentTypeParams(String mimeType)static StringUtils.PairparseUriIntoUrlBaseAndPath(String rawUri)static Map<String,String>parseUriPattern(String pattern, String url)static io.netty.handler.codec.http.FullHttpResponsetransform(io.netty.handler.codec.http.FullHttpResponse original, String body)
-
-
-
Method Detail
-
parseUriIntoUrlBaseAndPath
public static StringUtils.Pair parseUriIntoUrlBaseAndPath(String rawUri)
-
flushAndClose
public static void flushAndClose(io.netty.channel.Channel ch)
-
getSslContext
public static SSLContext getSslContext(File keyStoreFile)
-
createResponse
public static io.netty.handler.codec.http.FullHttpResponse createResponse(int status, String body)
-
createResponse
public static io.netty.handler.codec.http.FullHttpResponse createResponse(io.netty.handler.codec.http.HttpResponseStatus status, String body)
-
transform
public static io.netty.handler.codec.http.FullHttpResponse transform(io.netty.handler.codec.http.FullHttpResponse original, String body)
-
connectionEstablished
public static io.netty.handler.codec.http.FullHttpResponse connectionEstablished()
-
fixHeadersForProxy
public static void fixHeadersForProxy(io.netty.handler.codec.http.HttpRequest request)
-
addViaHeader
public static void addViaHeader(io.netty.handler.codec.http.HttpMessage msg, String alias)
-
-