al17nichols 0 Posted October 10, 2022 I have a url, parameters that I want to sent do an endpoint with the post command and receive a response token. I placed the url in the restclient with the endpoint as https://bbb.domainx.com/v31/api/auth. I added individual parameters. I assigned the method as rmpost ( i tried it as rmget ) in neither case did it work. I receive 404 Not found. Anybody know what I am doing wrong? Also. how can I find the resulting json that is being sent to the website (for trouble shooting purposes)? Share this post Link to post
ertank 27 Posted October 10, 2022 When I test it, GET method redirects to URL https://qws.quartix.com/v2/api/auth and respond with "{"Message":"The requested resource does not support http method 'GET'."}" There is no 404 error. I have tried to use TRESTRequest and other relevant components in the past. I got a memory leak that had to be fixed by Embarcadero. After that incident, I directly communicate using HTTP component of my choice. You should have a swagger or postman document or a web link for explanation of endpoints. You also should have some test environment credentials in order to be able to build your integration. I could not see any publicly available API information. You probably need to apply for it. Share this post Link to post
al17nichols 0 Posted October 11, 2022 I have the parameters you described, but I received response that it does not support method get. I have the mentioned credentials and supplied them as parameters to the trestrequest component with the parameters method property set as rm post. Message "The requested resource does not support http method 'GET'." Share this post Link to post
al17nichols 0 Posted October 11, 2022 I managed to solve this by correcting the a few of the properties and now I received the expected results. My remaining question is how do I know that exact statements are sent to the server? Is there a way to know what XML, JSON are we submitting to the endpoint? Share this post Link to post
Uwe Raabe 2057 Posted October 11, 2022 You can get the complete URL from TRESTRequest.GetFullRequestURL and the payload from TRESTRequest.Params.ParameterByName('body').Value (check for a nil parameter in case there is no body at all) Share this post Link to post
al17nichols 0 Posted October 11, 2022 Uwe Raabe Thanks this will be very helpful. Share this post Link to post
al17nichols 0 Posted October 12, 2022 (edited) closing here Edited October 12, 2022 by al17nichols Share this post Link to post