Jump to content

Search the Community

Showing results for tags 'rest'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 9 results

  1. Hi I am using the Delphi Rest Client and OAuth libraries from the units REST.Utils, REST.Types, REST.Client, REST.Authenticator.OAuth, REST.Authenticator.OAuth.WebForm.Win I have two dll's that uses these units successfully and both have runtime packages turned on for xmlrtl;vcl;vclx;rtl However when I try to load both dll's in the same exe, I get the following exception. exception class : EFilerError exception message : A class named TOAuth1SignatureMethod_PLAINTEXT already exists. Because the rest code seems to be in the rtl package, and both dll's are loading rtl package at runtime, I thought it should be ok, but apparently not. This class TOAuth1SignatureMethod_PLAINTEX is in REST.Authenticator.OAuth unit in C:\Program Files (x86)\Embarcadero\Studio\19.0\source\data\rest At the bottom of this file is the cause initialization RegisterClasses([TOAuth1SignatureMethod_PLAINTEXT, TOAuth1SignatureMethod_HMAC_SHA1]); Does anyone have any ideas how to resolve this ? Regards Peter Bug report below running in 64 bit. Username : peter date/time : 2020-11-20, 10:59:23, 388ms computer name : PETER user name : peter registered owner : peter operating system : Windows 10 x64 build 19041 system language : English system up time : 3 days 21 hours program up time : 2 minutes 47 seconds processors : 12x Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz physical memory : 4135/16235 MB (free/total) free disk space : (C:) 242.90 GB display mode : 2560x1440, 32 bit process id : $5f54 allocated memory : 1.60 GB largest free block : 130989.73 GB executable : prog.exe exec. date/time : 2020-11-20 09:15 version : 10.4.0.0 compiled with : Delphi 10.2 Tokyo madExcept version : 5.0.99 callstack crc : $398bae85, $14cecb7b, $317ff7bb exception number : 1 exception class : EFilerError exception message : A class named TOAuth1SignatureMethod_PLAINTEXT already exists. main thread ($6668): 033dcc0c +0cc rtl250.bpl 033de3fd +02d rtl250.bpl System Classes.RegisterClass 033de48e +01e rtl250.bpl System Classes.RegisterClasses 0328a309 +139 rtl250.bpl System _StartLib 7ffd4d02 +0df ntdll.dll LdrLoadDll 7ffd4ab8 +15b KERNELBASE.dll LoadLibraryExW 08502849 +049 MACM.dll unModuleInterface 164 +4 TModuleInterface.OpenLibrary 0880de40 +010 MACM.dll unRestInterface 213 +1 TRESTInt.OpenLibrary 08502673 +0a3 MACM.dll unModuleInterface 106 +9 TModuleInterface.Create 0880dd4b +08b MACM.dll unRestInterface 204 +1 TRESTInt.Create
  2. The following code snippet throws an exception when assigning the EMSProvider to the BackendEndpoint: EBackendServiceError with message 'Service not supported by EMS provider' EMSProvider1 := TEMSProvider.Create(self); EMSProvider1.Name := 'EMSProvider1'; bePOSTException := TBackendEndpoint.Create(self); bePOSTException.Name := 'bePOSTException'; bePOSTException.Provider := EMSProvider1; What service does the error refer?
  3. Hi all Delphier , good morning 😀😀 i have rest firemonkey app ,server , client im trying to check if the server is up or down from the client side using the code below , the code work fine , but when i run it its freeze the app for a while is there any proper way to do this ,thank you ,🤓☺️ try RequestLogin.Execute; if FrmLogin.RequestLogin.Response.Status.Success then begin showmessage ('server up') do something ..... end else except on e : exception do begin showmessage (' server down.... go home ') end end;
  4. How to send files to an API using TSslHttpRest? In Postman I can, this is the http code: POST /api/br-invoice-integration/v1/batches HTTP/1.1 Host: qed.onvio.com.br Accept: application/json Authorization: Bearer 42dc0b99-2d17-4898-9c85-0b52ae364c63Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file[]"; filename="/C:/MyFile.xml" Content-Type: text/xml (data) ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="query" {"boxe/File":true} ----WebKitFormBoundary7MA4YWxkTrZu0gW With SslHttpRest, I'm trying to SendStream, like that (similar to the sample OverbyteIcsHttpPost1): FileName := 'C:\MyFile.xml'; RandBoundary := '-----------------------------' + IntToHex(Random(MaxInt), 8) + IntToHex(Random(MaxInt), 8); SslHttpRest1.ContentTypePost := 'multipart/form-data; boundary=' + RandBoundary; Header := RandBoundary + #13#10 + 'Content-Disposition: form-data; name="file[]"; filename="' + 'MyFile.xml' + '"' + #13#10 + 'Content-Type: text/xml' + #13#10 + #13#10; Footer := RandBoundary + #13#10 + 'Content-Disposition: form-data; name="query"' + #13#10 + #13#10 + '{"boxe/File":true}' + #13#10 + RandBoundary + #13#10; SslHttpRest1.SendStream := TMultiPartFileReader.Create(Filename, Header, Footer); SslHttpRest1.SendStream.Position := 0; SslHttpRest1.RestRequest(httpPOST, Myurl); But it doesn't work, just get error: Request completed: 500 Request done, StatusCode #500 {"error":{"code":500,"errors":[],"message":"HTTP 400 Bad Request"}} Has anyone ever needed to do something similar, would this be the way? If anyone can help, I appreciate it.
  5. Hello, I have orders and orderdetails tables. There is one method that should be returning several orders when used. I would like to return a json string to such requests as in following example { "orders":[ { "id":1234, "date":"2020-05-29", "details":[ { "item":"1", "amount":3 }, { "item":"5", "amount":2 }, { "item":"116", "amount":1.3 } ] } ] } I know that I can define method to return a TJsonObject and build json piece by piece in method code. However, I would like to avoid that, if possible. I wonder if there is/are some other ways of doing so in MARS. Thanks & regards, Ertan
  6. Wij zijn op zoek naar een nieuwe aanwinst voor ons ontwikkel team in Oosterwolde. Syntri ontwikkelt een ERP systeem voor de maakindustrie, waarbij proces en workflow centraal staan. - Delphi 10.3 Rio VCL - iOS en Android ontwikkeling in Firemonkey - REST Api Vacature Software Ontwikkelaar
  7. Frédéric

    TDSRestConnection, bug in DoSetCredential

    Hi, Just want to share this and to eventually have confirmation (or not !!) I suspect a bug in the DoSetCredential method used by TDSRestConnection (System.Net.HttpClient.Win, TWinHTTPClient.DoSetCredential) I'm just upgrading an (working !) application from Delphi XE7 to Delphi 10.3.1. It's an application using Datasnap REST to communicate with a standalone Datasnap server (or IIS ISAPI in production) By doing my first tests I immediatly encountered the following problem: By calling the TDSRestConnection.TestConnection I get this error: Error adding header (87): Incorrect parameter ==> ('Paramètre incorrect' translated from french) Basic authentication is used. After debugging the code I saw that TNetEncoding.Base64.Encode adds a linebreak after 76 chars (The base64 encoded credentials goes slightly over 80chars...). This seems the default behavior the TBase64Encoding class but the WinHttpAddRequestHeaders API don't like it. I have changed the code in System.Net.HttpClient.Win to change the CharsPerLine to 255 and then it is OK. Bug or misuse ? Thanks ! Frederic
  8. Davide Visconti

    Web dashboard application

    Hi, I state that I have no skills on the argument, so bear with me. I have read a lot since last week but the argument is really a jungle and I'd like to read your very useful suggestions. I try to explain what we have to do. At the moment we have a win32 application developed in VCL Delphi Tokyo. This app read/write on localhost Firebird DB. Now, we have to realize a web application, like a dashboard , wich the users can utilize to see some values, some charts, execute some predefined queries and change some parameters on DB, the VCL app get some notifications when this happened (event alert) to update the in memory parameters. This web app should run on computer and android mobile too, like this forum 🙂 The number of clients connected are very few, maximum 5. Now, according to you, what library, framework, we have to use for the front-end...? For the back end? I have to use a REST service like @Andrea Magni's MARS Curiosity? Finally, can you give me some guide or how-to that you've found useful to begin please? THANKS A LOT for any suggestions.
  9. It is just a small addition to MARS Client library capabilities but TMARSClientResourceJSON now implements REST.Client.IRESTResponseJSON interface (from Delphi's REST Client library). This basically means you can use a TMARSClientResourceJSON and materialize a dataset through the TRESTResponseDataSetAdapter component (from Delphi's REST Client library). Enjoy 😉
×