We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7de2acd commit 85f92f8Copy full SHA for 85f92f8
examples/http_body.rs
@@ -60,7 +60,7 @@ impl HttpContext for HttpBody {
60
// Since we returned "Pause" previuously, this will return the whole body.
61
if let Some(body_bytes) = self.get_http_response_body(0, body_size) {
62
let body_str = String::from_utf8(body_bytes).unwrap();
63
- if body_str.find("secret").is_some() {
+ if body_str.contains("secret") {
64
let new_body = format!("Original message body ({} bytes) redacted.", body_size);
65
self.set_http_response_body(0, body_size, &new_body.into_bytes());
66
}
0 commit comments