Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Product Manuals » Elevate Web Builder 3 Manual » Using Server Requests » Executing a Server Request |
Name: Value
ID=100 Name=ACME Manufacturing, Inc. Contact=Bob Smith Address1=100 Main Street Address2= City=Bedford Falls State=NY ZipPostal=11178
procedure TMyForm.MyFormCreate(Sender: TObject); begin MyRequest:=TServerRequest.Create(nil); end; procedure TMyForm.MyFormDestroy(Sender: TObject); begin MyRequest.Free; end; procedure TMyForm.RequestComplete(Request: TServerRequest); begin if (Request.StatusCode=HTTP_OK) then ShowMessage('The value of the customer ID is '+ Request.ResponseContent.Values['ID']) else raise Exception.Create('Response Error: '+Request.StatusText); end; procedure TMyForm.GetCustomerClick(Sender: TObject); begin MyRequest.URL:='/customer'; MyRequest.Params.Add('method=info'); MyRequest.OnComplete:=RequestComplete; MyRequest.Execute; end;
procedure TMyForm.MyFormCreate(Sender: TObject); begin MyRequestQueue:=TServerRequestQueue.Create(nil); end; procedure TMyForm.MyFormDestroy(Sender: TObject); begin MyRequestQueue.Free; end; procedure TMyForm.RequestComplete(Request: TServerRequest); begin if (Request.StatusCode=HTTP_OK) then ShowMessage('The value of the customer ID is '+ Request.ResponseContent.Values['ID']) else raise Exception.Create('Response Error: '+Request.StatusText); end; procedure TMyForm.GetCustomerClick(Sender: TObject); var TempRequest: TServerRequest; begin TempRequest:=MyRequestQueue.GetNewRequest; TempRequest.URL:='/customer'; TempRequest.Params.Add('method=info'); TempRequest.OnComplete:=RequestComplete; MyRequestQueue.AddRequest(TempRequest); end;
HTTP_NONE = 0; HTTP_CONTINUE= 100; HTTP_OK = 200; HTTP_CREATED = 201; HTTP_MOVED_PERMANENTLY = 301; HTTP_FOUND = 302; HTTP_SEE_OTHER = 303; HTTP_NOT_MODIFIED = 304; HTTP_MOVED_TEMPORARILY = 307; HTTP_BAD_REQUEST = 400; HTTP_FORBIDDEN = 403; HTTP_NOT_FOUND = 404; HTTP_METHOD_NOT_ALLOWED = 405; HTTP_NO_LENGTH = 411; HTTP_PAYLOAD_TOO_LARGE = 413; HTTP_HEADERS_TOO_LARGE = 431; HTTP_INTERNAL_ERROR = 500; HTTP_NOT_IMPLEMENTED = 501; HTTP_SERVICE_UNAVAILABLE = 503; HTTP_VERSION_NOT_SUPPORTED = 505;
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |