AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Exemplo rest delphi11/19/2022 You should also free the TJSONObject, I didn't do that because I was in a hurry. JsonResponse := RESTResponse1.JSONValue as TJSONObject JsonBody.AddPair('to', '/topics/your_topic') JsonBody.AddPair('notification', JsonNotification) Before We Get Started: In this previous post, I showed how RAD Studio 10.2. JsonData.AddPair('click_action', 'FLUTTER_NOTIFICATION_CLICK') In this post, we’ll look at the steps to use the Sencha ExtJS library to create a Web Client to connect and get data from our RAD Studio’s RAD Server (also available with Delphi and/or C++ Builder). JsonNotification.AddPair('body', Mensagem) JsonNotification.AddPair('title', Titulo) ('Authorization', 'key=AAAd.', pkHTTPHEADER, ) RESTRequest1.Method := TRESTRequestMethod.rmPOST RESTResponse1 := TRESTResponse.Create(nil) RESTRequest1 := TRESTRequest.Create(nil) JsonBody, JsonNotification, JsonData, JsonResponse: TJSONObject įunction EnviarNotificacao(Titulo, Mensagem, Page: string): string end // if not all the files are received, then repeat the request, including the pageToken parameter in the URL if Length (NextToken) & gt 0 then begin ('pageToken', NextToken, pkGETorPOST) RESTRequest1.In case you want to send the firebase notification programmatically you can try the way I use and it is working for me. JsonValue.Value + '//' + FileObject.Get ('id'). JsonValue as TJSONArray // array elements of the array for I: = 0 to ListItems.Size-1 do begin FileObject: = ListItems.Get (i) as TJSONObject // get the name of the file (FileObject.Get ('title'). JsonValue.Value) end procedure TForm21.ParseFileList (AJSONObject: TJSONObject) var FileObject: TJSONObject Pair: TJSONPair NextToken: string ListItems: TJSONArray I: Integer begin // get the URL parameter to get the next part of the file list Pair: = AJSONObject.Get ('nextPageToken') if Assigned (Pair) then NextToken: = // get the list of files ListItems: = AJSONObject.Get ('items'). JsonValue.Value) ('Created Date:' + AJSONObject.Get ('createdDate'). JsonValue.Value) ('Mime-Type:' + AJSONObject.Get ('mimeType'). Procedure TForm21.ParseFile (AJSONObject: TJSONObject) begin ('Title:' + AJSONObject.Get ('title').
0 Comments
Read More
Leave a Reply. |