mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 15:21:23 +02:00
Fallback to jsonpath for response filter
This commit is contained in:
@@ -858,10 +858,11 @@ impl PluginManager {
|
|||||||
content: &str,
|
content: &str,
|
||||||
content_type: &str,
|
content_type: &str,
|
||||||
) -> Result<FilterResponse> {
|
) -> Result<FilterResponse> {
|
||||||
let plugin_name = if content_type.to_lowercase().contains("json") {
|
let ct = content_type.to_lowercase();
|
||||||
"@yaak/filter-jsonpath"
|
let plugin_name = if ct.contains("xml") || ct.contains("html") {
|
||||||
} else {
|
|
||||||
"@yaak/filter-xpath"
|
"@yaak/filter-xpath"
|
||||||
|
} else {
|
||||||
|
"@yaak/filter-jsonpath"
|
||||||
};
|
};
|
||||||
|
|
||||||
let plugin = self
|
let plugin = self
|
||||||
|
|||||||
Reference in New Issue
Block a user