mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-26 10:18:26 +02:00
Implement "/__admin/requests"
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// Body Model
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// Cookie Model
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// Header Model
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// MappingModel
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// MatcherModel
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// Param Model
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// RequestModel
|
||||
@@ -16,9 +16,9 @@ namespace WireMock.Admin
|
||||
public UrlModel Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The verbs
|
||||
/// The methods
|
||||
/// </summary>
|
||||
public string[] Verbs { get; set; }
|
||||
public string[] Methods { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Headers.
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// ResponseModel
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin
|
||||
namespace WireMock.Admin.Mappings
|
||||
{
|
||||
/// <summary>
|
||||
/// UrlModel
|
||||
24
src/WireMock.Net/Admin/Requests/LogEntryModel.cs
Normal file
24
src/WireMock.Net/Admin/Requests/LogEntryModel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace WireMock.Admin.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Request Log Model
|
||||
/// </summary>
|
||||
public class LogEntryModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the request.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The request.
|
||||
/// </value>
|
||||
public LogRequestModel Request { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the response.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The response.
|
||||
/// </value>
|
||||
public LogResponseModel Response { get; set; }
|
||||
}
|
||||
}
|
||||
104
src/WireMock.Net/Admin/Requests/LogRequestModel.cs
Normal file
104
src/WireMock.Net/Admin/Requests/LogRequestModel.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using WireMock.Util;
|
||||
|
||||
namespace WireMock.Admin.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// RequestMessage Model
|
||||
/// </summary>
|
||||
public class LogRequestModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The unique identifier.
|
||||
/// </value>
|
||||
public Guid Guid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the DateTime.
|
||||
/// </summary>
|
||||
public DateTime DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the URL.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The URL.
|
||||
/// </value>
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the absolete URL.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The absolete URL.
|
||||
/// </value>
|
||||
public string AbsoleteUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the query.
|
||||
/// </summary>
|
||||
public IDictionary<string, WireMockList<string>> Query { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the method.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The method.
|
||||
/// </value>
|
||||
public string Method { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Headers.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The Headers.
|
||||
/// </value>
|
||||
public IDictionary<string, string> Headers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Cookies.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The Cookies.
|
||||
/// </value>
|
||||
public IDictionary<string, string> Cookies { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the body.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The body.
|
||||
/// </value>
|
||||
public string Body { get; set; }
|
||||
|
||||
/*
|
||||
"id" : "45760a03-eebb-4387-ad0d-bb89b5d3d662",
|
||||
"request" : {
|
||||
"url" : "/received-request/9",
|
||||
"absoluteUrl" : "http://localhost:56715/received-request/9",
|
||||
"method" : "GET",
|
||||
"clientIp" : "127.0.0.1",
|
||||
"headers" : {
|
||||
"Connection" : "keep-alive",
|
||||
"Host" : "localhost:56715",
|
||||
"User-Agent" : "Apache-HttpClient/4.5.1 (Java/1.7.0_51)"
|
||||
},
|
||||
"cookies" : { },
|
||||
"browserProxyRequest" : false,
|
||||
"loggedDate" : 1471442494809,
|
||||
"bodyAsBase64" : "",
|
||||
"body" : "",
|
||||
"loggedDateString" : "2016-08-17T14:01:34Z"
|
||||
},
|
||||
"responseDefinition" : {
|
||||
"status" : 404,
|
||||
"transformers" : [ ],
|
||||
"fromConfiguredStub" : false,
|
||||
"transformerParameters" : { }
|
||||
}*/
|
||||
}
|
||||
}
|
||||
30
src/WireMock.Net/Admin/Requests/LogResponseModel.cs
Normal file
30
src/WireMock.Net/Admin/Requests/LogResponseModel.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WireMock.Admin.Requests
|
||||
{
|
||||
/// <summary>
|
||||
/// Response MessageModel
|
||||
/// </summary>
|
||||
public class LogResponseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the status code.
|
||||
/// </summary>
|
||||
public int StatusCode { get; set; } = 200;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the headers.
|
||||
/// </summary>
|
||||
public IDictionary<string, string> Headers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the body.
|
||||
/// </summary>
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the original body.
|
||||
/// </summary>
|
||||
public string BodyOriginal { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user