0

我以独立模式启动了wiremock,并通过对“http://localhost:8080/__admin/recordings/start”的api调用开始录制。所有请求都被代理到https://restcountries.eu

发出一个请求后,通过对http://localhost:8080/__admin/recordings/stop.

服务提供者返回的 Json 响应以二进制格式保存在生成​​的映射文件中。请参阅body下面映射 json 中的属性

 ~/tools/wiremock/mappings  cat rest_v2_alpha_col-87f9980c-05c2-47ee-9032-5065f3fd51a1.json                                                                                                                              ✔  04:39:00 PM
{
  "id" : "87f9980c-05c2-47ee-9032-5065f3fd51a1",
  "name" : "rest_v2_alpha_col",
  "request" : {
    "url" : "/rest/v2/alpha/col",
    "method" : "GET"
  },
  "response" : {
    "status" : 200,
    "body" : "�b\u0002\u0000���f�j�\u0004j[\u0013Sv\u0016�W�V�(��<���J��\u000E�V��\u0001dB�@����\u001A�jl��\u001F�9WB�?C2\u001B\"��F�\u0005w�\u000B\u001E�ſ\u001E�Tj 0�ΧS��\u0011}�jn���\u0014�\t���Cͅ��πB\u001Bث눭�C+�,%�=��{��R�\u0004\u0004�}�c��/ĝ�@�ـuے׌��D�����\u0019��)\b�{2�#\u0014ӎ�FU\u0017;!\u0003��諢��p�\u001B�zC\u000E���\u0004�[o�ڠ]o�q�?N\u000FR\rىuY�Q\u0010�V�5�\u000E�M�Ē����#\u000E�\"3�P�{��Z�'�M^�\u0017p��o��\u0012\u001C��\u001E86���a�\u001Dߟ���&gt;�hoͺm��\u0003\fY�qKk�\u001C,�ܐ�Dӏ�����g�\u0000�۶���\u000Fҩ7G~\tO�ďSR86`\u0011���;��\u0016\u0004�:�}�6\u00162��r�{`�\u000Ey�\u000EɎ�w#@<\u0002�\u0015�4�����Jɛ���\u0006\u001C�\n\u0002��E��g�jQ�zS�|�ם\b����_;meQ�\u001C\u0014�*��~]��Ԃ����j����>�\tG$\u0013��\u0018��F%7!FM�n��]`�\r�]=�&amp;�ƀrwW�\n���/\u0010ؔ꣒�\u001C��YEZX\bx��@ள�H�h�C�n\u0018\u0000�m*]��۸|x�\t\u0005�v\u001C�\u001A�{d=��n\u0014���\u001B�\u0000�&gt;�˝=o�\r�j�X��\u001E���Ȗ\u000B�������[l��\u0015\u0015\bCt���������\\M�\u001F\f�UĎ\u000B;;\\�Q�\u0002�=��\u0010\u0007� �\u001Fg\u000EV����cb\u0000\u0003",
    "headers" : {
      "Date" : "Fri, 02 Apr 2021 08:38:41 GMT",
      "Content-Type" : "application/json;charset=utf-8",
      "Set-Cookie" : [ "__cfduid=da582b5ac2a3069300801df44a09c0f871617352720; expires=Sun, 02-May-21 08:38:40 GMT; path=/; domain=.restcountries.eu; HttpOnly; SameSite=Lax", "__cfduid=d190a9e0636c395b983c994313c878d971617352721; expires=Sun, 02-May-21 08:38:41 GMT; path=/; domain=.restcountries.eu; HttpOnly; SameSite=Lax" ],
      "Cache-Control" : "public, max-age=86400",
      "CF-Cache-Status" : "DYNAMIC",
      "cf-request-id" : "09335519550000dd36af0c9000000001",
      "Report-To" : "{\"max_age\":604800,\"group\":\"cf-nel\",\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report?s=NR%2F6jfxBu7LvA%2FO4lpxZFamPt3TYLrYftRnr9upImOVJ9V3FgiFlwK7J61Q0jQay7EEIHWr30A7r%2Bi5mKFJd4XtIwyUczgUQNfYeq%2BZj5qyr\"}]}",
      "NEL" : "{\"report_to\":\"cf-nel\",\"max_age\":604800}",
      "alt-svc" : "h3-27=\":443\"; ma=86400, h3-28=\":443\"; ma=86400, h3-29=\":443\"; ma=86400",
      "Expect-CT" : "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
      "Server" : "cloudflare",
      "CF-RAY" : "6398be088f7fdd36-SIN"
    }
  },
  "uuid" : "87f9980c-05c2-47ee-9032-5065f3fd51a1",
  "persistent" : true,
  "scenarioName" : "scenario-1-rest-v2-alpha-col",
  "requiredScenarioState" : "scenario-1-rest-v2-alpha-col-2",
  "insertionIndex" : 4
}

有关如何解决此问题的任何建议?

4

0 回答 0