Search the Community
Showing results for tags 'http'.
-
Dear all, I have success to implement the SSL for our new project UNIGUI. But i have a problem to redirect to from http to https. My http apps is like http://erp1.domain.com:8088/ and i want to redirect to https://erp.newdomain.com:8099/ It's because we already have many customers use it. and now we link to a local bank, and need a secure connection to be done. I already try to looking our forums for an answer but I don't understand and lose. can help me to give the clue ?
-
Hi, I just made a HTTP call in UniGui Desktop and it works perfectly. I made the same in UniGui Mobile using mobile components and it's not working. HTTP - Request procedure TUFmLoginm.btLoginRequestClick(Sender: TObject); Var aUrlSubmit, aUrlCancel, aUrl, sProtocol :string; Begin frmPinm.UnimURLFrame1.URL := ''; if UniServerModule.PINEndPoint.Contains('https') then sProtocol := 'https' else sProtocol := 'http'; aUrlSubmit := UniSession.CallbackUrlEx('loggedwithcredentials', self, ['RES', 'OK']); if sProtocol.Contains('https') and not aUrlSubmit.Contains('https') then aUrlSubmit := aUrlSubmit.Replace('http', sProtocol, []); aUrlSubmit := aUrlSubmit.Replace(#$D#$A, '', [rfReplaceAll]); aUrlSubmit := TNetEncoding.URL.Encode(TStringRoutines.GetBase64CryptedString(aUrlSubmit)); aUrlCancel := UniSession.CallbackUrlEx('logincancelled', self, ['RES', 'Cancel']); if sProtocol.Contains('https') and not aUrlCancel.Contains('https') then aUrlCancel := aUrlCancel.Replace('http', sProtocol, []); aUrlCancel := aUrlCancel.Replace(#$D#$A, '', [rfReplaceAll]); aUrlCancel := TNetEncoding.URL.Encode(TStringRoutines.GetBase64CryptedString(aUrlCancel)); if TUniGUIApplication(UniApplication).Parameters.values['gestore'].IsEmpty then aUrl := UniServerModule.PINEndPoint+'/?action=authn&gestore='+UniMainModule.gestore+'&url_submit='+aUrlSubmit+'&url_cancel='+aUrlCancel+'&_S_ID='+UniSession.SessionId+'&appid='+UniMainModule.appID else aUrl := UniServerModule.PINEndPoint+'/?action=authn&gestore='+TUniGUIApplication(UniApplication).Parameters.values['gestore']+'&url_submit='+aUrlSubmit+'&url_cancel='+aUrlCancel+'&_S_ID='+UniSession.SessionId+'&appid='+UniMainModule.appID; frmPinm.UnimURLFrame1.URL := aURL; frmPinm.Show End; End Point procedure TFrmAuthnm.FormPost; var data_event : string; begin { ... elaboration ... } with UniMainModule.GetDM do begin if not UniMainModule.Url_submit.IsEmpty then begin if FResponsePost then begin s := 'var f = document.createElement("form"); '+ 'f.action="'+UniMainModule.Url_submit+'"; '+ // the second app url 'f.method="POST"; '; s := s+ 'var i=document.createElement("input"); '+ // url_submit 'i.type="hidden"; '+ 'i.name="data_event"; '+ 'i.value="'+TNetEncoding.Url.Encode(data_event)+'"; '+ 'f.appendChild(i); '; s := s+ 'document.body.appendChild(f); '+ 'f.submit(); '; UniSession.AddJS(s) end else UniSession.UrlRedirect(UniMainModule.Url_submit+'&data_event='+TNetEncoding.Url.Encode(data_event)); end; end; Ajax Event that intercept CallBack procedure TUFmLoginm.UnimLoginFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var jsonResponse, aURL : string; credentials : TLoginCredentials; begin if (EventName = 'loggedwithcredentials') and (Params.Values['RES']='OK') then begin if not Params.Values['data_event'].IsEmpty then begin // elab .... frmPinm.Hide; ModalResult := mrOK finally credentials.Free end end end end; All works fine except AjaxEvent that doesn't intercept the EventName "loggedwithcredentials".
-
Hello!! Example: I have a "System A" that generates a report. This report is sent to the client in PDF format. I want to change the way the report is sent. Instead of sending the PDF, I want to send a link so that the final client can access the report at any time. In "System A" I generate a link (example, http://169.111.22.222:8082+codeof verification). I have another 'System B' that reads this link and opens the report. How to read this link and its parameters? Thank you. ------------------------------------------------------------- Olá!! Exemplo: Eu tenho um "Sistema A" que gera um relatório. Este relatório é enviado ao cliente em formato PDF. Eu quero mudar a forma de envio do relatório. Ao invés de mandar o PDF, quero mandar um link, para que o cliente final, possa acessar o relatório o qualquer momento. No "Sistema A" eu gero um link (exemplo, http://169.111.22.222:8082+codigode verificacao). Tenho outro 'Sistema B" que faz a leitura deste link e abre o relatório. Como ler este link e seus parâmetros? Obrigado.