Page 1 of 1

BesaFHIR Released v 1.0.19!

Posted: Tue Apr 20, 2021 6:25 am
by admin
Dear users,

Besa Software is glad to release the new version 1.0.19!

This version includes:
+ Added Custom HttpType connection.If you want to use other components for http connection (ICS Overbyte, Synopse mORMOT, synapse ..). You must use hcCustom type. And you must create your handler method.

How to use:

Code: Select all

procedure TForm3.btnCreate(Sender: TObject);
begin
  client.HttpType := hcCustom;
  client.OnExecuteVerbStream := ExecuteVerbStream;
end;

procedure TForm3.ExecuteVerbStream(AVerb:TBSFhirHTTPVerb; AUrl:String; ARequest, AResponse:TStream; const ARequestHeaders, AResponseHeaders: TStrings; var AResponseCode:Integer; var AResponseText:String);
var
  LRequestStr:string;
begin
  // Request Stream
  LRequestStr:= TStringStream(ARequest).DataString;
  
  // Execute your components equivalent method.
  case AVerb of
    fverbGet: ;// samplecomponent.Get(AUrl)
    fverbPost: ; // samplecomponent.Post(AUrl)
    fverbPut: ;
    fverbDelete: ;
    fverbOptions: ;
    fverbPatch: ;
  end;
	
  (*
    //Set response stream. (Stream is TStringStream type)
    TStringStream(AResponse).WriteString(response);
    //Set response headers.
    AResponseHeaders.
    AResponseCode:= samplecomponent.StatusCode;
    AResponseText:= samplecomponent.StatusText;
  *)
end;
We're looking forward to your comments and suggestions.
Besa Sofware Team.