mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-15 21:32:40 +01:00
WithBodyFromFile (#56)
This commit is contained in:
1 parent
15370a89ca
commit
cbe6a0a2b4
16 files changed
+180
-118
No files matched your search
@@ -18,9 +18,6 @@
|
||||
<Content Include="__admin\mappings\11111110-a633-40e8-a244-5cb80bc0ab66.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="__admin\mappings\826aff7c-6208-4a3c-923d-575248907db4.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -28,4 +25,13 @@
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="__admin\mappings\791a3f31-6946-4ce7-8e6f-0237c7443275.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="__admin\mappings\791a3f31-6946-4ce7-8e6f-0237c7443275.json">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Guid": "791a3f31-6946-4ce7-8e6f-0237c7443275",
|
||||
"Title": "",
|
||||
"Priority": 0,
|
||||
"Request": {
|
||||
"Path": {
|
||||
"Matchers": [
|
||||
{
|
||||
"Name": "WildcardMatcher",
|
||||
"Pattern": "/proxy-google-test-post"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Methods": [
|
||||
"post"
|
||||
],
|
||||
"Body": {}
|
||||
},
|
||||
"Response": {
|
||||
"StatusCode": 404,
|
||||
"Body": "<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">\n <title>Error 404 (Not Found)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n </style>\n <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n <p><b>404.</b> <ins>That’s an error.</ins>\n <p>The requested URL <code>/proxy-google-test-post</code> was not found on this server. <ins>That’s all we know.</ins>\n",
|
||||
"BodyAsBytes": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CiAgPG1ldGEgY2hhcnNldD11dGYtOD4KICA8bWV0YSBuYW1lPXZpZXdwb3J0IGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MSwgbWluaW11bS1zY2FsZT0xLCB3aWR0aD1kZXZpY2Utd2lkdGgiPgogIDx0aXRsZT5FcnJvciA0MDQgKE5vdCBGb3VuZCkhITE8L3RpdGxlPgogIDxzdHlsZT4KICAgICp7bWFyZ2luOjA7cGFkZGluZzowfWh0bWwsY29kZXtmb250OjE1cHgvMjJweCBhcmlhbCxzYW5zLXNlcmlmfWh0bWx7YmFja2dyb3VuZDojZmZ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B9fUBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKC13ZWJraXQtbWluLWRldmljZS1waXhlbC1yYXRpbzoyKXsjbG9nb3tiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9icmFuZGluZy9nb29nbGVsb2dvLzJ4L2dvb2dsZWxvZ29fY29sb3JfMTUweDU0ZHAucG5nKSBuby1yZXBlYXQ7LXdlYmtpdC1iYWNrZ3JvdW5kLXNpemU6MTAwJSAxMDAlfX0jbG9nb3tkaXNwbGF5OmlubGluZS1ibG9jaztoZWlnaHQ6NTRweDt3aWR0aDoxNTBweH0KICA8L3N0eWxlPgogIDxhIGhyZWY9Ly93d3cuZ29vZ2xlLmNvbS8+PHNwYW4gaWQ9bG9nbyBhcmlhLWxhYmVsPUdvb2dsZT48L3NwYW4+PC9hPgogIDxwPjxiPjQwNC48L2I+IDxpbnM+VGhhdOKAmXMgYW4gZXJyb3IuPC9pbnM+CiAgPHA+VGhlIHJlcXVlc3RlZCBVUkwgPGNvZGU+L3Byb3h5LWdvb2dsZS10ZXN0LXBvc3Q8L2NvZGU+IHdhcyBub3QgZm91bmQgb24gdGhpcyBzZXJ2ZXIuICA8aW5zPlRoYXTigJlzIGFsbCB3ZSBrbm93LjwvaW5zPgo=",
|
||||
"BodyEncoding": {
|
||||
"CodePage": 65001,
|
||||
"EncodingName": "Unicode (UTF-8)",
|
||||
"WebName": "utf-8"
|
||||
},
|
||||
"UseTransformer": false,
|
||||
"Headers": {
|
||||
"Date": "Wed, 25 Oct 2017 18:57:40 GMT",
|
||||
"Alt-Svc": "quic=\":443\"; ma=2592000; v=\"39,38,37,35\"",
|
||||
"Referrer-Policy": "no-referrer",
|
||||
"Connection": "close"
|
||||
}
|
||||
}
|
||||
}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"Guid": "826aff7c-6208-4a3c-923d-575248907db4",
|
||||
"Priority": 0,
|
||||
"Request": {
|
||||
"Path": {
|
||||
"Matchers": [
|
||||
{
|
||||
"Name": "WildcardMatcher",
|
||||
"Pattern": "/earth/story/20170510-terrifying-20m-tall-rogue-waves-are-actually-real"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Methods": [
|
||||
"get"
|
||||
]
|
||||
},
|
||||
"Response": {
|
||||
"StatusCode": 200,
|
||||
"Body": " <!DOCTYPE html> <html class=\" b-pw-1280\" lang=\"en\" > <head> <!-- Barlesque 3.21.13 --> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /> <meta name=\"description\" content=\"Breaking news, sport, TV, radio and a whole lot more. The BBC informs, educates and entertains - wherever you are, whatever your age.\" /> <meta name=\"keywords\" content=\"BBC, bbc.co.uk, bbc.com, Search, British Broadcasting Corporation, BBC iPlayer, BBCi\" /> <title>BBC - Homepage</title> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /> <meta property=\"fb:admins\" content=\"100004154058350\" /> <script type=\"text/javascript\">window.bbcredirection={geo:true}</script> \n<!--[if (gt IE 8) | (IEMobile)]><!-->\n<link rel=\"stylesheet\" href=\"http://static.bbci.co.uk/frameworks/barlesque/3.21.13/orb/4/style/orb.min.css\">\n<!--<![endif]-->\n\n<!--[if (lt IE 9) & (!IEMobile)]>\n<link rel=\"stylesheet\" href=\"http://static.bbci.co.uk/frameworks/barlesque/3.21.13/orb/4/style/orb-ie.min.css\">\n<![endif]-->\n\n <!--orb.ws.require.lib--> <script class=\"js-require-lib\" src=\"http://static.bbci.co.uk/frameworks/requirejs/lib.js\"></script> <script type=\"text/javascript\"> bbcRequireMap = {\"jquery-1\":\"http://static.bbci.co.uk/frameworks/jquery/0.4.1/sharedmodules/jquery-1.7.2\", \"jquery-1.4\":\"http://static.bbci.co.uk/frameworks/jquery/0.4.1/sharedmodules/jquery-1.4\", \"jquery-1.9\":\"http://static.bbci.co.uk/frameworks/jquery/0.4.1/sharedmodules/jquery-1.9.1\", \"jquery-1.12\":\"http://static.bbci.co.uk/frameworks/jquery/0.4.1/sharedmodules/jquery-1.12.0.min\", \"jquery-2.2\":\"http://static.bbci.co.uk/frameworks/jquery/0.4.1/sharedmodules/jquery-2.2.0.min\", \"istats-1\":\"//nav.files.bbci.co.uk/nav-analytics/0.1.0-43/js/istats-1\", \"swfobject-2\":\"http://static.bbci.co.uk/frameworks/swfobject/0.1.10/sharedmodules/swfobject-2\", \"demi-1\":\"http://static.bbci.co.uk/frameworks/demi/0.10.1/sharedmodules/demi-1\", \"gelui-1\":\"http://static.bbci.co.uk/frameworks/gelui/0.9.13/sharedmodules/gelui-1\", \"cssp!gelui-1/overlay\":\"http://static.bbci.co.uk/frameworks/gelui/0.9.13/sharedmodules/gelui-1/overlay.css\", \"relay-1\":\"http://static.bbci.co.uk/frameworks/relay/0.2.6/sharedmodules/relay-1\", \"clock-1\":\"http://static.bbci.co.uk/frameworks/clock/0.1.9/sharedmodules/clock-1\", \"canvas-clock-1\":\"http://static.bbci.co.uk/frameworks/clock/0.1.9/sharedmodules/canvas-clock-1\", \"cssp!clock-1\":\"http://static.bbci.co.uk/frameworks/clock/0.1.9/sharedmodules/clock-1.css\", \"jssignals-1\":\"http://static.bbci.co.uk/frameworks/jssignals/0.3.6/modules/jssignals-1\", \"jcarousel-1\":\"http://static.bbci.co.uk/frameworks/jcarousel/0.1.10/modules/jcarousel-1\", \"bump-3\":\"//emp.bbci.co.uk/emp/bump-3/bump-3\", \"ads\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/ads\", \"app\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/app\", \"compiled\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/compiled\", \"homepage\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/homepage\", \"lib/core\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/lib/core\", \"lib/module/base\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/lib/module/base\", \"lib/module/manager\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/lib/module/manager\", \"lib/timeInterval\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/lib/timeInterval\", \"lib/util\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/lib/util\", \"modules/header\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/header\", \"modules/images\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/images\", \"modules/media\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/media\", \"modules/video\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/video\", \"modules/video/dataProvider\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/video/dataProvider\", \"modules/video/player\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/video/player\", \"modules/video/playlist\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/video/playlist\", \"modules/video/playlistBuilder\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/video/playlistBuilder\", \"modules/weather\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/modules/weather\", \"vendor/pre-built/bbc-video-experience/continuousPlay/module\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/vendor/pre-built/bbc-video-experience/continuousPlay/module\", \"vendor/pre-built/vwo/mvt-snippet\":\"http://static.bbci.co.uk/wwhp/1.114.0/modules/vendor/pre-built/vwo/mvt-snippet\"}; require({ baseUrl: 'http://static.bbci.co.uk/', paths: bbcRequireMap, waitSeconds: 30 }); </script> <script type=\"text/javascript\">/*<![CDATA[*/ if (typeof bbccookies_flag === 'undefined') { bbccookies_flag = 'ON'; } showCTA_flag = true; cta_enabled = (showCTA_flag && (bbccookies_flag === 'ON')); (function(){var m=\"ckns_policy\",q=\"Thu, 01 Jan 1Line truncated
|
||||
"BodyEncoding": {
|
||||
"CodePage": 65001,
|
||||
"EncodingName": "Unicode (UTF-8)",
|
||||
"WebName": "utf-8"
|
||||
},
|
||||
"UseTransformer": false,
|
||||
"Headers": {
|
||||
"Set-Cookie": "BBC-UID=d5e9e11601d6a92baa56889831b1cedf3e0040fa733856b32b0ba4234e28e4740PostmanRuntime/3.0.11-hotfix.2; expires=Tue, 11-May-21 20:10:03 GMT; path=/; domain=.bbc.com",
|
||||
"Cache-Control": "max-age=60, private",
|
||||
"Vary": "X-CDN",
|
||||
"X-Cache-Action": "HIT",
|
||||
"Date": "Fri, 12 May 2017 20:10:03 GMT",
|
||||
"ETag": "\"777c5af8426c21563a57166e437d820a\"",
|
||||
"X-PAL-Host": "pal010.back.live.cwwtf.local:80",
|
||||
"Connection": "keep-alive",
|
||||
"X-Cache-Hits": "5",
|
||||
"Server": "Apache",
|
||||
"X-Cache-Age": "37",
|
||||
"X-LB-NoCache": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user