Skip to content

Instantly share code, notes, and snippets.

@Sugrob57
Last active November 25, 2022 15:19
Show Gist options
  • Save Sugrob57/a5b6cf13e73dd774ce94a4cf9a317389 to your computer and use it in GitHub Desktop.
Save Sugrob57/a5b6cf13e73dd774ce94a4cf9a317389 to your computer and use it in GitHub Desktop.
WireNock.NET requests response sample
// GET https://wiremock-url.com/__admin/requests
[
{
"Guid": "9d1e7906-cf2e-4ca8-9fa3-1ade133835a2",
"Request": {
"ClientIP": "10.222.22.22",
"DateTime": "2022-11-21T10:35:41.5508475Z",
"Path": "/Subscriptions/v2.0/api/Subscription/notifyUsage",
"AbsolutePath": "/Subscriptions/v2.0/api/Subscription/notifyUsage",
"Url": "http://wiremock.my-site.com/Subscriptions/v2.0/api/Subscription/notifyUsage",
"AbsoluteUrl": "http://wiremock.my-site.com/Subscriptions/v2.0/api/Subscription/notifyUsage",
"Query": {},
"Method": "POST",
"Headers": {
"Date": [
"Mon, 21 Nov 2022 10:35:41 GMT"
],
"Content-Type": [
"application/json; charset=utf-8"
],
"Accept": [
"application/json"
],
"Host": [
"wiremock.my-site.com"
],
"Content-Length": [
"65"
],
"X-Request-ID": [
"e24c05e0b650dcc0c5f7412517f5869b"
],
"X-Real-IP": [
"10.240.16.79"
],
"X-Forwarded-For": [
"10.240.16.79"
],
"X-Forwarded-Host": [
"wiremock.my-site.com"
],
"X-Forwarded-Port": [
"443"
],
"X-Forwarded-Proto": [
"https"
],
"X-Forwarded-Scheme": [
"https"
],
"X-Scheme": [
"https"
]
},
"Body": "{\"LicenseId\":\"a11be891-1777-4685-ac00-4fd7aae1bc7a\",\"Quantity\":1}",
"BodyAsJson": {
"LicenseId": "a11be891-1777-4685-ac00-4fd7aae1bc7a",
"Quantity": 1
},
"BodyEncoding": {
"CodePage": 65001,
"EncodingName": "Unicode (UTF-8)",
"WebName": "utf-8"
},
"DetectedBodyType": "Json",
"DetectedBodyTypeFromContentType": "Json"
},
"Response": {
"StatusCode": 404,
"Headers": {
"Content-Type": [
"application/json"
]
},
"BodyAsJson": {
"Status": "No matching mapping found"
},
"DetectedBodyType": 2,
"DetectedBodyTypeFromContentType": 0
},
"PartialMappingGuid": "ad8a6891-eb47-4b05-8e34-0e50f4cb4d05",
"PartialRequestMatchResult": {
"TotalScore": 1,
"TotalNumber": 3,
"IsPerfectMatch": false,
"AverageTotalScore": 0.3333333333333333,
"MatchDetails": [
{
"Name": "PathMatcher",
"Score": 1
},
{
"Name": "MethodMatcher",
"Score": 1
},
{
"Name": "BodyMatcher",
"Score": 0
}
]
}
},
{
"Guid": "bd08cfc9-a5d5-4c2e-aca6-9256fa573390",
"Request": {
"ClientIP": "10.222.22.22",
"DateTime": "2022-10-27T12:41:35.9487807Z",
"Path": "/api/v1/access/f1209fbd-db77-498f-8f86-6c0b12351717",
"AbsolutePath": "/api/v1/access/f1209fbd-db77-498f-8f86-6c0b12351717",
"Url": "http://wiremock.ny-web-site.com/api/v1/access/f1209fbd-db77-498f-8f86-6c0b12351717",
"AbsoluteUrl": "http://wiremock.ny-web-site.com/api/v1/access/f1209fbd-db77-498f-8f86-6c0b12351717",
"Query": {},
"Method": "GET",
"Headers": {
"Date": [
"Thu, 27 Oct 2022 12:41:35 GMT"
],
"Accept": [
"application/json"
],
"Host": [
"wiremock.ny-web-site.com"
],
"traceparent": [
"00-aaaaaaaaaa4aaaaaaaaaaaaaa808bb14-cccccccccdc4b970-00"
],
"ssl-client-cert": [
"-----BEGIN%20CERTIFICATE-----XXXXX----END%20CERTIFICATE-----%0A"
],
"ssl-client-verify": [
"SUCCESS"
],
"ssl-client-subject-dn": [
"CN=XXXXX,OU=Dev,O=XXXXX"
],
"ssl-client-issuer-dn": [
"CN=XXXX XXXXX XXXXX"
],
"X-Request-ID": [
"89da79059d47ef5199345a54919a31a6"
],
"X-Real-IP": [
"10.222.22.22"
],
"X-Forwarded-For": [
"10.222.22.22"
],
"X-Forwarded-Host": [
"wiremock.ny-web-site.com"
],
"X-Forwarded-Port": [
"443"
],
"X-Forwarded-Proto": [
"https"
],
"X-Forwarded-Scheme": [
"https"
],
"X-Scheme": [
"https"
]
}
},
"Response": {
"StatusCode": 200,
"Headers": {
"Content-Type": [
"application/json"
]
},
"BodyAsJson": {
"Access": "true"
},
"DetectedBodyType": 2,
"DetectedBodyTypeFromContentType": 0
},
"MappingGuid": "03b76624-f1b2-4bd9-94cb-918647449080",
"RequestMatchResult": {
"TotalScore": 2.0,
"TotalNumber": 2,
"IsPerfectMatch": true,
"AverageTotalScore": 1.0,
"MatchDetails": [
{
"Name": "PathMatcher",
"Score": 1.0
},
{
"Name": "MethodMatcher",
"Score": 1.0
}
]
},
"PartialMappingGuid": "03b76624-f1b2-4bd9-94cb-918647449080",
"PartialRequestMatchResult": {
"TotalScore": 2.0,
"TotalNumber": 2,
"IsPerfectMatch": true,
"AverageTotalScore": 1.0,
"MatchDetails": [
{
"Name": "PathMatcher",
"Score": 1.0
},
{
"Name": "MethodMatcher",
"Score": 1.0
}
]
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment