| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using WireMock.Admin.Mappings; |
| | | 4 | | using WireMock.Http; |
| | | 5 | | using WireMock.Util; |
| | | 6 | | |
| | | 7 | | namespace WireMock |
| | | 8 | | { |
| | | 9 | | internal static class ResponseMessageBuilder |
| | | 10 | | { |
| | 1 | 11 | | private static string ContentTypeJson = "application/json"; |
| | 1 | 12 | | private static readonly IDictionary<string, WireMockList<string>> ContentTypeJsonHeaders = new Dictionary<string |
| | | 13 | | |
| | | 14 | | internal static ResponseMessage Create(string message, int statusCode = 200, Guid? guid = null) |
| | 18 | 15 | | { |
| | 18 | 16 | | var response = new ResponseMessage |
| | 18 | 17 | | { |
| | 18 | 18 | | StatusCode = statusCode, |
| | 18 | 19 | | Headers = ContentTypeJsonHeaders, |
| | 18 | 20 | | BodyAsJson = message != null ? new StatusModel { Status = message, Guid = guid } : null |
| | 18 | 21 | | }; |
| | | 22 | | |
| | 18 | 23 | | return response; |
| | 18 | 24 | | } |
| | | 25 | | } |
| | | 26 | | } |