From f96cc98ea890610e79694d790850da19e2d6d988 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sat, 18 Nov 2017 12:26:55 +0100 Subject: [PATCH] Updated Record (via proxy) and Save (markdown) --- ...-Save.md => Settings-:-Record-(via-proxy)-and-Save.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename Record-(via-proxy)-and-Save.md => Settings-:-Record-(via-proxy)-and-Save.md (60%) diff --git a/Record-(via-proxy)-and-Save.md b/Settings-:-Record-(via-proxy)-and-Save.md similarity index 60% rename from Record-(via-proxy)-and-Save.md rename to Settings-:-Record-(via-proxy)-and-Save.md index 754ad3e..061d542 100644 --- a/Record-(via-proxy)-and-Save.md +++ b/Settings-:-Record-(via-proxy)-and-Save.md @@ -8,9 +8,16 @@ var server = FluentMockServer.Start(new FluentMockServerSettings ProxyAndRecordSettings = new ProxyAndRecordSettings { Url = "http://www.bbc.com", - SaveMapping = true + SaveMapping = true, + SaveMappingToFile = true } }); ``` +Where +* Url = The url to proxy to +* SaveMapping = Save the mapping for each request/response to the internal Mappings +* SaveMappingToFile = Save the mapping for each request/response to also file. (Note that SaveMapping must also be set to true.) + +### Example: When you a request like `localhost:9095/earth/story/20170510-terrifying-20m-tall-rogue-waves-are-actually-real`, this request is proxied to the `bbc.com` and the mapping definition is saved to `__admin\mappings\ab38efae-4e4d-4f20-8afe-635533ec2535.json`. \ No newline at end of file