Add the ability while generating a mock to specify a file to use as the request body
This was the last real hole in the mock generation--you should now be able to generate a response for whatever endpoint you want with whatever request body and parameters you desire.
| /Address | URL for device (eg. https://10.0.0.1:11443) |
| /User | WDP username |
| /Pwd | WDP password |
| /Endpoint | API to call (default is all endoints in program.cs) |
| /Method | HTTP method to use (default is GET) |
| /Directory | Directory to save mock data file(s) (default is .\MockData) |
| /requestBody | File to use for the request body. Only applicable when /Endpoint is present. |
| /requestBodyMultiPartFile | Normally the requestBody file is considered JSON and provided as is. Specify this parameter to include it as a multipart file instead. |
### MockDataGenerator File Name Format
@@ -151,6 +153,12 @@ All examples connect to 10.0.0.1:11443 with username TestUser and password Super
privateconststringGeneralUsageMessage="Usage: /address:<URL for device (eg. https://10.0.0.1:11443)> /user:<WDP username> /pwd:<WDP password> [/endpoint:<api to call>] [/directory:<directory to save mock data file(s)>";
privateconststringGeneralUsageMessage="Usage: /address:<URL for device (eg. https://10.0.0.1:11443)> /user:<WDP username> /pwd:<WDP password> [/endpoint:<api to call> [/method:<http method>] [/requestBody:<path to file for requestBody (PUT and POST only)>] [/requestBodyMultiPartFile (otherwise defaults to application/json] [/directory:<directory to save mock data file(s)>";
/// <summary>
/// Endpoints for REST calls to populate. Feel free to override this list (especially locally) to