Target server vs service callout Policy?

Not applicable

Is it good to have service callout to call the external url or service call out?I want to know from performace point of view which is good

0 2 907
2 REPLIES 2

Not applicable

I'm not sure I understand the question. Can you clarify the scenario you're thinking of?

adas
New Member

I think you are talking about service callout vs target endpoint. Implementation wise both are similar and would perform the same way. Service callout solves a different use-case, where you need to make intermediate http callouts to an endpoint before you eventually call your target endpoint. For example, you maybe calling a location API to get your current location before making a target backend call to submit an order. Both have very similar constructs and support dynamic URLs, named target servers etc. so the choice is entirely yours. If you do not want to use target endpoint and simply want to use service callouts, that's just one extra policy that you would have to add, and then you need to pass on the service callout response and the final response from your API. With target endpoints those come built in so you don't have to worry about those aspects.