Use values from other fields Request Header Request Method Request URL Request URL Param Request Raw Body Request Parsed Body Request Body Length Use values from other fields¶ Dynamic Values Use values from other fields Variables from previous responses Environment variables Use File dynamic values anywhere Useful dynamic values How to make your own dynamic value For general information about dynamic values and instructions on how to insert them in Paw see the introduction to dynamic values. Reuse values from other fields in a very declarative way. Request HeaderRequest Header¶ Returns the value of the given header name. It will get an header field from selected request, and return the value for the given header name. com.luckymarmot.RequestHeaderDynamicValue Argument: request: string: (current request)The UUID of the request to inspect the headers. (current request) Argument: header: DynamicString: NoneThe header name to extract. function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestHeaderDynamicValue', { request: requestUuid, header: 'Authorization' /* the header name from selected request */ }); return dv.getEvaluatedString(); }; Request MethodRequest Method¶ Returns the method of the selected request. com.luckymarmot.RequestMethodDynamicValue Argument: request: string: (current request)The UUID of the request to get the method from. (current request) function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestMethodDynamicValue', { request: requestUuid }); return dv.getEvaluatedString(); }; Request URLRequest URL¶ Returns the URL of the selected request. Optionally, can strip scheme, host and/or parameters. com.luckymarmot.RequestURLDynamicValue Argument: request: string: (current request)The UUID of the request to get the URL from. (current request) Argument: includeScheme: bool: ``true``Include scheme on the returned URL. true Argument: includeHost: bool: ``true``Include host on the returned URL. true Argument: includeParameters: bool: ``true``Include parameters on the returned URL. true function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestURLDynamicValue', { request: requestUuid, includeHost: false }); return dv.getEvaluatedString(); }; Request URL ParamRequest URL Param¶ Returns an URL parameter of the selected request. com.luckymarmot.RequestURLParamDynamicValue Argument: request: string: (current request)The UUID of the request to get the URL parameter from. (current request) Argument: param: DynamicString: (current request)The URL parameter to extract. (current request) function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestURLParamDynamicValue', { request: requestUuid, param: 'query' }); return dv.getEvaluatedString(); }; Request Raw BodyRequest Raw Body¶ Extracts the raw body of the selected request. com.luckymarmot.RequestRawBodyDynamicValue Argument: request: string: (current request)The UUID of the request to get the raw body from. (current request) Argument: header: DynamicString: (current request)The name of the header to return. (current request) function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestRawBodyDynamicValue', { request: requestUuid, }); return dv.getEvaluatedString(); }; Request Parsed BodyRequest Parsed Body¶ Extract a field from the request body. It will parse the selected request body, and return the value (or serialized subtree) for the given key-path. Format for Key Path extraction¶ To access nested levels use a dot separator. Use numbers to access elements in a list. As you start typing Paw will suggest autocomplete options for you. Get nested dictionary keys (e.g. user.user_id) Get nested array items (e.g. users.0 or user[0]) Get all items of an array (e.g. users.*.user_id) com.luckymarmot.RequestBodyPathDynamicValue Argument: request: string: (current request)The UUID of the request to get the parsed body from. (current request) Argument: keyPath: DynamicString: NoneThe body path to extract. Argument: format: number: ``0`` (automatic)The request format to use for parsing (0: automatic, 1: JSON, 2: XML, 3: Form URL-Encoded). 0 (automatic) function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestBodyPathDynamicValue', { request: requestUuid, keyPath: 'array[0].key.path' /* any dict key or array index */, format: 0 /* 0 = Automatic */ }); return dv.getEvaluatedString(); }; Request Body LengthRequest Body Length¶ Returns the body length of the selected request. com.luckymarmot.RequestBodyLengthDynamicValue Argument: request: string: (current request)The UUID of the request to get the body length from. (current request) function evaluate(context){ var requestUuid = context.getCurrentRequest().id; var dv = new DynamicValue('com.luckymarmot.RequestBodyLengthDynamicValue', { request: requestUuid }); return dv.getEvaluatedString(); };