相关文章推荐
自信的楼梯  ·  SpringBoot ...·  9 月前    · 
自信的楼梯  ·  variable-extractor·  11 月前    · 
自信的楼梯  ·  Functions for Use in ...·  11 月前    · 
自信的楼梯  ·  Spring Expression ...·  11 月前    · 
严肃的皮蛋  ·  Retrieve Original ...·  18 小时前    · 
严肃的围巾  ·  C++内部函数与外部函数 | ...·  18 小时前    · 
性感的绿豆  ·  SQL ...·  18 小时前    · 
完美的充值卡  ·  A Basic AWS Lambda ...·  18 小时前    · 

Extractor

Extractors allow chaining several API calls where the argument of a call can be extracted from a previous call.

Available settings

Name Description Accept variable Required Since
name The name of the extractor -
from The response part where to extract value. The available values are "header", "body" and "both".The default value is "body". - -
xpath The XPath expression where to extract value. Only available when "from" value is "body". - -
jsonpath The JSONPath expression where to extract value. Only available when "from" value is "body". - -
regexp The regular expression applies on "from" value. If "Body" and "xpath" or "jsonpath" is specified, then the extraction is done on the result of the xpath or jsonpath.The default value is "(.*)". - -
match_number If multiple values have matched "regexp", the match number defines which match to use. Value "-1" is to extract all occurrences, "0" to randomly extract one occurence and "N" to extract the Nth occurrence.The default value is "1". - -
template The template used to construct the value. This is an arbitrary string containing special elements that refer to groups within the regular expression (a group is a dynamic portion of the regular expression set within brackets): $0$ refers to the entire text matching the expression, $1$ refers to group 1, $2$ refers to group 2, and so on.The default value is $1$. - -
decode The decoder to apply on the value. The available values are "html" and "url". - -
extract_once This option allows considering only the first value extracted. The available values are "true" and "false".The default value is "false". - -
default The value to return when not extracted.The default value is " ". - -
throw_assertion_error Raises an assertion error when no match found.The default value is "true". - -

Example

Defining 2 extractors: one matching any number in header, and another one matching the first occurence of regular expression on JSONPath.

 
推荐文章