I have a curl request to an api thus:
curl xx.yy.zz:8080 -X POST --data "bb=True&alg=egbis&image_url=https://someurl.com/someimage.jpg"
and this returns valid json results back.
Now trying to call this from a C# application using Unirest
thus:
string postData = "\"bb=True&alg=egbis&image_url=" + url + "\"";
HttpResponse<string> jsonResponse = Unirest.post("http://xx.yy:8080/")
.body(postData)
.asJson<string>();
Have also tried without a double-quote preceding the bb=true and including/excluding the --data
param in post string.
But keep getting this error:
"{\"error\":\"not indexable\"}\r\n"
Have been stuck on this for the last couple of hours, pretty sure it's something silly, but am at a loss.
Thanks in advance for any help!