-
Notifications
You must be signed in to change notification settings - Fork 78
Description
I am having problems with Postman code for c#. The suggested code for a detect operation is
var client = new RestClient("https://api.kairos.com/detect"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("app_id", "3458eaed"); request.AddHeader("app_key", "2b9f9b765126465d4dcd263bbd5f8dc6"); request.AddFile("image", "/C:/Users/Simon/Pictures/Faces/Test (7).jpg"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);
This fails with an Illegal path message from C# in request.AddFile. Changing the line to
request.AddFile("image", @"C:\Users\Simon\Pictures\Faces\Test (7).jpg");
results in the request running OK but returning response content with the error message “image one or more required parameters are missing”.
The error message below is obtained in Postman by changing the Key value to anything other than "image" or the Value value to a non-existent local file
image one or more required parameters are missing