原书出处
Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)
11 Chapter 11. Testing 本地 HTTP 替身检查协议
Matcher::UrlEncoded("param2".into(), "value2".into()), ])) .with_status(201) .with_body("world") .expect(5) .create();
Our mock has the endpoint /my-endpoint. Our mock also expects certain parameters in the URL. Our mock will return the response code of 201 with a body of world. We also expect our server to be hit five times. We can add more endpoints if we want, but for this example we are using only one to avoid bloating the chapter.
Now that our mock server is built,
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch11.html#id73
EPUB SHA-256:109ff0224da54833b0d49c82502e850845274913fe34a7168dcf36a9c075b4e0