0
イムに動作していない。ここで https://api.yotpo.com/products/abc123apikey/yotpo_global_reviews/reviewsRSpecのWebmockはこの要求を行う
を私のエラーです:
Failure/Error: resp = HTTParty.get(BASE_URL + PRODUCTS + yotpo_api_key + GLOBAL_REVIEWS)
WebMock::NetConnectNotAllowedError:
Real HTTP connections are disabled. Unregistered request: GET https://api.yotpo.com/products/abc123apikey/yotpo_global_reviews/reviews with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}
You can stub this request with the following snippet:
stub_request(:get, "https://api.yotpo.com/products/abc123apikey/yotpo_global_reviews/reviews").
with(headers: {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}).
to_return(status: 200, body: "", headers: {})
registered request stubs:
stub_request(:any, "/https:\/\/api.baremetrics.com/")
stub_request(:post, "https://api.mixpanel.com/track")
stub_request(:post, "https://api.mixpanel.com/engage")
私は正確なスニペットを使用していますが、何も作業していません。私は束を探して試してみたが、何も変わっていない。私はあまりにもヘッダーを削除しようとしました。
このスタブリクエストでは動的なものは表示されません。私は明白な間違いをしていますか?
削除したい場合は、質問の下に「削除」リンクがあります。 – Floern