Jump to content

Jon R

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by Jon R

  1. I have a FireMonkey app developed using Delphi 11.3 (version 28.0.48361.3236) where I have a RESTRequest component for sending GET requests. Running on Windows everything works fine, but when I run the same app on an Android device the app is executing a POST request instead of the GET request. Before I execute the request I set RESTRequest1.Method := rmGET; but the RESTRequest is sending a POST anyway on Android. The Android SDK is version 25.2.5, level 31. Any idea how I can solve this?
  2. Thank you for the response and input. I was replacing an older application and was copying the content of the requests and in the search request the search parameters was in a JSON payload in the body. But I have checked the server documentation and it seems like it is also possible to send the data using the query string. So this alternative will solve my problem.
  3. After some more testing I have found that the problem is when I add a body to the RESTRequest. Here is code from a small test application. The form contains a TRESTClient and a TRESTRequest and thats it: procedure TForm7.test; var jsRequest: TJSONObject; begin restclient1.Accept := 'application/json'; restclient1.BaseURL := 'https://myserver/v1/api'; jsRequest := TJSONObject.Create(); jsRequest.AddPair('test', '123'); RESTRequest1.AddBody(jsRequest); // --> This causes the problem jsRequest.Free(); RESTRequest1.Method := rmGET; RESTRequest1.Execute(); end; If I add the body the method changes from GET to POST on Android (not on WIndows). If I dont add body the method is not changed.
  4. Jon R

    Error Message after Update to 11.2

    I got same problem now when uninstalling 11.1 and installing 11.3. Solved by deleting AppData\Roaming\Embarcadero\BDS\22.0\AndroidManifest.xml and the AndroidManifest.template.xml file in the project folder. Thank you Dave!
×