Hello BobT,
thanks a lot for your help! When I use your code, than the image is not found in my case. I also noticed, that the new RestClient needs some URL in order to work propoerly, but all possible variants I could think of did not work. The response to the request "IRestResponse response = client.Execute(request);" always came back with "File not found"...
Yesterday I also worked again on the problem and found another solution to it.
The missing public class SgImageResponse I had also found and implemented, otherwise the code did not compile at all.
This is my code now
const string BaseUrl = "http://localhost:59590/json/reply/";
RestSharp.IRestClient client = new RestClient(BaseUrl);
var request = new RestRequest(Method.GET);
request.Resource = BaseUrl + "SgGetImagePath";
request.RequestFormat = DataFormat.Json;
request.AddHeader("Content-Type", "application/json");
request.AddParameter("Receipt", receipt);
IRestResponse response = client.Execute(request);
SgGenericResponse good = JsonConvert.DeserializeObject<SgGenericResponse>(response.Content);
This works in my case, I get the file path and everything is fine
Next step is getting SGP to solve the image ....
It would be also good to have an API call available, which allows to select and start the CCD from the external software. In my application I check, whether SGP is already up and running, before trying to execute the request to the API. In case it is not running, I am starting SGP, but I can't connect automatically to a specific CCD... So for now I simply notify the user, that he has to set the CCD manually in SGP instead of doing it for the user automatically. Maybe that can be added to the API in the future.
Thx
Ralf