書名: Microservices Development Cookbook作者名: Paul Osman本章字數: 45字更新時間: 2021-07-16 17:48:28
How to do it...
Now that you have webmock included in your project, you can start stubbing HTTP requests in your specs. Once again, open specs/spec_helper.rb and add the following content:
stub_request(:post, "attachment-service.yourorg.example.com"). with(body: {media_type: 1}, headers: {"Content-Type" => /image\/.+/}). to_return(body: { foo: bar })
推薦閱讀
- Mastering Node.js(Second Edition)
- Twilio Cookbook
- 智能網聯汽車V2X與智能網聯設施I2X
- 計算機網絡與數據通信
- HTML5 Game development with ImpactJS
- 中小型局域網組建、管理與維護實戰
- Microsoft Dynamics CRM 2011 Applications(MB2-868) Certification Guide
- Scala Design Patterns.
- 物聯網的機遇與利用
- 華為HCIA-Datacom認證指南
- 區塊鏈技術與應用:打造分布式商業新生態
- 一本書讀懂移動物聯網
- Microsoft System Center 2012 Configuration Manager:Administration Cookbook
- OpenShift Cookbook
- 5G低功耗蜂窩物聯網開發與應用