.การทำปูมบันทึก

รหัสตัวอย่าง

1
0

การตอบสนอการทำปูมบันทึก



Response Logging
If you want to print the response body regardless of the
status code you can do:

get("/x").then().log().body() ..
This will print the response body regardless if an error occurred.
If you're only interested in printing the response body if an error
occur then you can use:

get("/x").then().log().ifError(). .. 
You can also log all details in the response
including status line, headers and cookies:

get("/x").then().log().all(). .. 
as well as only status line, headers or cookies:

get("/x").then().log().statusLine(). .. // Only log the status line
get("/x").then().log().headers(). .. // Only log the response headers
get("/x").then().log().cookies(). .. // Only log the response cookies
You can also configure to log the response
only if the status code matches some value:

get("/x").then().log().ifStatusCodeIsEqualTo(302). .. // 
Only log if the status code is equal to 302

get("/x").then().log().ifStatusCodeMatches(matcher). .. //
Only log if the status code matches the supplied Hamcrest matcher
-2
0

ปลั๊กอินสำหรับไพธอนการทำปูมบันทึก

!python -m unittest test_volume_cuboid.py

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังหน้ากับตัวอย่างอยู่ในหมวดหมู่