postman-code-generators
postman-code-generators copied to clipboard
C# use verbatim string
Current generated requests are a tragedy to read. We could improve this a bit by introducing a verbatim string with @ prefix. Instead of this:
request.AddParameter("application/json", "{ \r\n \"order\":{ \r\n \"items\":[ \r\n { \r\n \"name\": ...
It could be like this:
request.AddParameter("application/json", @"{
""order"": {
""items"": [
{
""name"": ...
If accepted, it would probably be a good idea to make this as a toggleable setting, for users that want to have these long one-lines or for others that want to have it in semi-formatted way.
A good source for information - https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/verbatim