Package org.apache.jmeter.protocol.http.curl

# Class BasicCurlParser

java.lang.Object
org.apache.jmeter.protocol.http.curl.BasicCurlParser

public class BasicCurlParser extends Object
Basic cURL command parser that handles:

Since:
  5.1

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`BasicCurlParser.Request`

## Constructor Summary

Constructors
Constructor
Description
`BasicCurlParser()`

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`isValidCookie(String str)`
Verify if the string is cookie or filename
`BasicCurlParser.Request`
`parse(String commandLine)`
`void`
`setAuthUserPasswd(String authentication, String url, Authorization authorization)`
Set the username , password and baseurl of authorization
`static List<Cookie>`
`stringToCookie(String cookieStr, String url)`
Convert string to cookie
`static String[]`
`translateCommandline(String toProcess)`
Crack a command line.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BasicCurlParser

public BasicCurlParser()

## Method Details

### parse

public BasicCurlParser.Request parse(String commandLine)

### translateCommandline

public static String[] translateCommandline(String toProcess)
Crack a command line.

Parameters:
  `toProcess` - the command line to process.
Returns:
  the command line broken into strings. An empty or null toProcess parameter results in a zero sized array.

### setAuthUserPasswd

public void setAuthUserPasswd(String authentication, String url, Authorization authorization)
Set the username , password and baseurl of authorization

Parameters:
  `authentication` - the username and password of authorization
  `url` - the baseurl of authorization
  `authorization` - the object of authorization

### isValidCookie

public static boolean isValidCookie(String str)
Verify if the string is cookie or filename

Parameters:
  `str` - the cookie to check
Returns:
  Whether the format of the string is cookie

### stringToCookie

public static List<Cookie> stringToCookie(String cookieStr, String url)
Convert string to cookie

Parameters:
  `cookieStr` - the cookie as a string
  `url` - to extract domain and path for the cookie from
Returns:
  list of cookies