I'm wondering, Is there an option to receive data with @HTTPGET --> Make some manipulation on this data --> Create new REST request and send it to different URL - On the same Class?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
@HttpGet method can manipulate what it receives and then make an Http request to a different URL.
If you are asking can that different URL be handled by the same class, that depends on the
@RestResource. If that pattern is fixed like this then no:
but if it includes wildcards then yes, though you will need to add code to explicitly handle the various values:
(There is a hacky approach for a fixed URL in that you can write one Apex method for each of the HTTP methods
@HttpPut. But that is likely to result in a design that is quite different from the normal REST patterns.)