-
-
Save Sugrob57/d2666d099c03e49034b90c1ea6bd8cbe to your computer and use it in GitHub Desktop.
WireNock.NET request body
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// POST/PUT https://wiremock-url.com/__admin/mappings | |
{ | |
"Priority": null, | |
"Scenario": null, | |
"WhenStateIs": null, | |
"SetStateTo": null, | |
"Request": { | |
"ClientIP": null, | |
"Path": { | |
"Matchers": [ | |
{ | |
"Name": "WildcardMatcher", | |
"Pattern": "/CloudResourcePortal/api/v1/token", | |
"Patterns": null, | |
"IgnoreCase": true, | |
"RejectOnMatch": null | |
} | |
] | |
}, | |
"Methods": [ | |
"Post" | |
], | |
"Headers": null, | |
"Cookies": null, | |
"Params": null, | |
"Body": { | |
"Matchers": [ | |
{ | |
"Name": "JmesPathMatcher", | |
"Pattern": "grant_type == 'authorization_code' && code != null", | |
"Patterns": null, | |
"IgnoreCase": true, | |
"RejectOnMatch": null | |
} | |
] | |
} | |
}, | |
"Response": { | |
"StatusCode": 200, | |
"BodyDestination": null, | |
"Body": null, | |
"BodyAsJson": { | |
"token_type": "Bearer", | |
"expires_in": 3600, | |
"id_token": { | |
"iss": "https://dev.cloud.kaspersky.com", | |
"sub": "{{Random Type=\"TextRegex\" Pattern=\"[a-f0-9]{32}\"}}", | |
"aud": "DLP", | |
"exp": 1605631164, | |
"iat": 1605627564 | |
} | |
}, | |
"BodyAsJsonIndented": null, | |
"BodyAsBytes": null, | |
"BodyAsFile": null, | |
"BodyAsFileIsCached": null, | |
"BodyEncoding": null, | |
"UseTransformer": true, | |
"UseTransformerForBodyAsFile": null, | |
"Headers": { | |
"Content-Type": "application/json" | |
}, | |
"HeadersRaw": null, | |
"Delay": null, | |
"ProxyUrl": null, | |
"X509Certificate2ThumbprintOrSubjectName": null, | |
"Fault": null, | |
"WebProxy": null | |
}, | |
"SaveToFile": null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment