jasaad Posted January 12, 2019 Share Posted January 12, 2019 I used to call a web service like this... IdHTTP1 := TIdHTTP.Create(nil); IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded'; MPData := TIdMultiPartFormDataStream.Create; MPData.AddFile('file', Image_File_path, 'image/jpg'); MPData.AddFormField('apikey', 'xxxxxxxxxxx'); MPData.AddFormField('language', 'eng'); MPData.AddFormField('isOverlayRequired', 'False'); sResponse := IdHTTP1.Post('https://api.ocr.space/parse/image', MPData); JsonObject := TJSONObject.Create; JsonValue := JsonObject.ParseJSONValue(sResponse); JsonValue:=(JsonValue as TJSONObject).Get('ParsedResults').JSONValue; if (JsonValue is TJSONArray) then sValue := ((JsonValue as TJSONArray).Items[0] as TJSonObject).Get('ParsedText').JSONValue.Value; UniMemo1.Lines.Add(sValue); how to do the same using UNIGUI application? Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 13, 2019 Share Posted January 13, 2019 You can use this code in unigui. What is your goal? 1 Link to comment Share on other sites More sharing options...
billyChou Posted April 7, 2019 Share Posted April 7, 2019 you can use the same code in unigui. or use Http Test - http://www.overbyte.be sample in UNIGUI. Link to comment Share on other sites More sharing options...
GerhardV Posted April 8, 2019 Share Posted April 8, 2019 Or you can use the TRESTClient, TRESTRequest and TRESTResponse components....depending on your Delphi version. 1 Link to comment Share on other sites More sharing options...
Recommended Posts