Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions samples/http-cats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Use this preset to return funny cat images when simulating erroneous HTTP status

Version|Date|Comments
-------|----|--------
1.5|February 11, 2025|Updated to 0.24 schema
1.4|January 17, 2024|Updated plugin path
1.3|January 11, 2024|Updated to new format
1.2|December 22, 2023|Updated to new format
Expand Down
2 changes: 1 addition & 1 deletion samples/http-cats/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Testing doesn't have to boring! Use this preset to return funny cat images when simulating erroneous HTTP status codes for Microsoft Graph. This preset contains images for the following HTTP status codes: 429, 500, 502, 503, 504 and 507. When you test your app in the browser, and the Dev Proxy returns one of these status codes, you will see a funny cat image instead of a boring error message. Have fun! 🐱 HTTP cat pictures by Tomomi Imura."
],
"creationDateTime": "2023-08-10",
"updateDateTime": "2024-01-17",
"updateDateTime": "2025-02-11",
"products": [
"Dev Proxy",
"Microsoft Graph"
Expand Down
19 changes: 2 additions & 17 deletions samples/http-cats/http-cats-config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.24.0/rc.schema.json",
"plugins": [
{
"name": "GenericRandomErrorPlugin",
Expand All @@ -21,26 +22,10 @@
"https://*.sharepoint-df.*/*_api/*",
"https://*.sharepoint-df.*/*_vti_bin/*"
],
"mocksPlugin": {
"mocksFile": "responses.json"
},
"graphRandomErrorsPlugin": {
"allowedErrors": [
429,
500,
502,
503,
504,
507
]
},
"executionSummaryPlugin": {
"groupBy": "url"
},
"httpCats": {
"errorsFile": "http-cats-responses.json"
},
"rate": 50,
"labelMode": "text",
"logLevel": "info"
"logLevel": "information"
}
158 changes: 83 additions & 75 deletions samples/http-cats/http-cats-responses.json
Original file line number Diff line number Diff line change
@@ -1,92 +1,100 @@
{
"responses": [
"$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.24.0/genericrandomerrorplugin.schema.json",
"errors": [
{
"statusCode": 429,
"headers": [
"request": {
"url": "https://*/*"
},
"responses": [
{
"name": "content-type",
"value": "image/jpeg"
"statusCode": 429,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
},
{
"name": "Retry-After",
"value": "@dynamic"
}
],
"body": "@http-cats/429.jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
"statusCode": 500,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/500.jpeg"
},
{
"name": "Retry-After",
"value": "@dynamic"
}
],
"body": "@http-cats/429.jpeg"
},
{
"statusCode": 500,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
"statusCode": 502,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/502.jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/500.jpeg"
},
{
"statusCode": 502,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
"statusCode": 503,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/503.jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/502.jpeg"
},
{
"statusCode": 503,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/503.jpeg"
},
{
"statusCode": 504,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/504.jpeg"
},
{
"statusCode": 507,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
"statusCode": 504,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/504.jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
"statusCode": 507,
"headers": [
{
"name": "content-type",
"value": "image/jpeg"
},
{
"name": "Access-Control-Allow-Origin",
"value": "*"
}
],
"body": "@http-cats/507.jpeg"
}
],
"body": "@http-cats/507.jpeg"
]
}
]
}