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 void
addViaHeader(io.netty.handler.codec.http.HttpMessage msg, String alias)
static io.netty.handler.codec.http.FullHttpResponse
connectionEstablished()
static io.netty.handler.codec.http.FullHttpResponse
createResponse(int status, String body)
static io.netty.handler.codec.http.FullHttpResponse
createResponse(io.netty.handler.codec.http.HttpResponseStatus status, String body)
static void
createSelfSignedCertificate(File cert, File key)
static void
fixHeadersForProxy(io.netty.handler.codec.http.HttpRequest request)
static void
flushAndClose(io.netty.channel.Channel ch)
static SSLContext
getSslContext(File keyStoreFile)
static File
initKeyStore(File keyStoreFile)
static String
normaliseUriPath(String uri)
static Charset
parseContentTypeCharset(String mimeType)
static Map<String,String>
parseContentTypeParams(String mimeType)
static StringUtils.Pair
parseUriIntoUrlBaseAndPath(String rawUri)
static Map<String,String>
parseUriPattern(String pattern, String url)
static io.netty.handler.codec.http.FullHttpResponse
transform(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)
-
-