SuperBenchmarker: Can't figure out how to POST with parameterised data :(
Hi @aliostad 👋
Struggling to figure out how to do a POST where the payload is supplied in a file.
branding-post-data.csv
[{"prop":"value1"]]
[{"prop":"value2"]]
[{"prop":"value3"]]
(ie each line has an array)
branding-template.txt
Content-Type: application/json
{
"listings": {{{LISTINGS}}}
}
So i’m essentially trying to do this:
POST /somewhere
{
"listings": [{"prop":"value1"}]
}
Here’s what i’m running, and what i’m seeing:
sb -u "https://localhost:44300/listings/ids/branding" -f branding-post-data.csv -t branding-template.txt -m POST -b -c 1 -y 1000 -g 2 -U -d
Starting at 21/05/2020 5:26:16 PM System.ArgumentOutOfRangeException: Length cannot be less than zero. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at SuperBenchmarker.TemplateParser.Init(String headers) in :line 0 at SuperBenchmarker.AsyncRequesterBase…ctor(CommandLineOptions options) in :line 0 at SuperBenchmarker.Program.WithOptionDoItBoy(CommandLineOptions commandLineOptions) in :line 0
Could you please tell me what i’m doing wrong?
Thanks 😃
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
Yep, I see. I don’t think it needs to be bold. Just the error messages need to be a bit friendlier.