Webmock stub request with any body and header

前端 未结 2 1694
予麋鹿
予麋鹿 2021-02-07 07:13

How to use Webmock to stub request with any body and header? I tried to use regex

WebMock.stub_request(:post, \'api.quickblox.com/\').with(:body => /.*?/, :h         


        
2条回答
  •  误落风尘
    2021-02-07 07:44

    Check out the Webmock docs on headers. You need to provide it a hash with further details on what you are matching.

提交回复
热议问题