File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/webserver/database/sqlpage_functions Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,9 @@ async fn fetch_with_meta(
261261 String :: from_utf8_lossy ( & body_bytes) . into_owned ( ) ,
262262 ) ,
263263 }
264- } else if let Ok ( text) = String :: from_utf8 ( body_bytes. clone ( ) ) { serde_json:: Value :: String ( text) } else {
264+ } else if let Ok ( text) = String :: from_utf8 ( body_bytes. clone ( ) ) {
265+ serde_json:: Value :: String ( text)
266+ } else {
265267 let mut base64_string = String :: new ( ) ;
266268 base64:: Engine :: encode_string (
267269 & base64:: engine:: general_purpose:: STANDARD ,
Original file line number Diff line number Diff line change 1+ set res = sqlpage .fetch_with_meta (' {
2+ "method": "PUT",
3+ "url": "http://localhost:62802/hello_world",
4+ "headers": {
5+ "user-agent": "myself"
6+ }
7+ }' );
8+ select ' text' as component,
9+ case
10+ when json_extract($res, ' $.status' ) = 200
11+ and cast(json_extract($res, ' $.headers.content-length' ) as int ) > 100
12+ and json_extract($res, ' $.body' ) like ' PUT /hello_world%'
13+ then ' It works !'
14+ else ' It failed! Got: ' || $res
15+ end as contents;
You can’t perform that action at this time.
0 commit comments