Access Violation Http Post

  

By user3376886 I am building a firemonkey mobile app and when I run the following segment of code and I get an access violation but cannot figure out why:

procedure TForm1.Button1Click(Sender: TObject);
var
LHandler: TIdSSLIOHandlerSocketOpenSSL;
lParamList: TStringList;
data: String;
begin
lParamList := TStringList.Create;
lParamList.Add(‘userName=’+Edit_Username.Text);
lParamList.Add(‘password=’+Edit_Password.Text);

try
IdHTTP1.IOHandler:=LHandler;
data := IdHTTP1.Post(‘https://api.netbiter.net/operation/v1/rest/json/user/authenticate’, lParamList);
//data := lHTTP.Post(‘https://api.netbiter.net/operation/v1/rest/json/user/authenticate’, lParamList);
finally
FreeAndNil(lParamList);
end;
//ShowMessage(data);
end

; …read more

Via: StackOverflow

Comments are closed.