Package com.github.dzieciou.testing.curl
Class CurlCommand
- java.lang.Object
-
- com.github.dzieciou.testing.curl.CurlCommand
-
public class CurlCommand extends Object
Represents curl command and provides a way to serialize it throughasString(Platform, boolean, boolean, boolean)method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCurlCommand.FormPartstatic classCurlCommand.Headerstatic classCurlCommand.ServerAuthentication
-
Constructor Summary
Constructors Constructor Description CurlCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurlCommandaddDataBinary(String dataBinary)CurlCommandaddFormPart(String name, String content)CurlCommandaddHeader(String name, String value)StringasString(Platform targetPlatform, boolean useShortForm, boolean printMultiliner, boolean escapeNonAscii)booleanhasData()CurlCommandremoveHeader(String name)CurlCommandsetCompressed(boolean compressed)CurlCommandsetCookieHeader(String cookieHeader)CurlCommandsetInsecure(boolean insecure)CurlCommandsetMethod(String method)CurlCommandsetServerAuthentication(String user, String password)CurlCommandsetUrl(String url)CurlCommandsetVerbose(boolean verbose)StringtoString()
-
-
-
Method Detail
-
setUrl
public CurlCommand setUrl(String url)
-
addHeader
public CurlCommand addHeader(String name, String value)
-
removeHeader
public CurlCommand removeHeader(String name)
-
addFormPart
public CurlCommand addFormPart(String name, String content)
-
addDataBinary
public CurlCommand addDataBinary(String dataBinary)
-
setCookieHeader
public CurlCommand setCookieHeader(String cookieHeader)
-
setCompressed
public CurlCommand setCompressed(boolean compressed)
-
setVerbose
public CurlCommand setVerbose(boolean verbose)
-
setInsecure
public CurlCommand setInsecure(boolean insecure)
-
setMethod
public CurlCommand setMethod(String method)
-
setServerAuthentication
public CurlCommand setServerAuthentication(String user, String password)
-
asString
public String asString(Platform targetPlatform, boolean useShortForm, boolean printMultiliner, boolean escapeNonAscii)
-
hasData
public boolean hasData()
-
-