Forum Discussion
You can't access an endpoint from a component server-side (in the freemarker logic). You will need to use javascript to call the endpoint from your component.
Another option you can try is to make your http.client call in your page initialization script then set the result as the value of a request attribute: use the http.request.setAttribute call (that is documented on the http request freemarker context object article) in your page initialization script, then use thehttp.request.attributes.name.get call to retrieve the attribute in your component(s).
-Doug
@Doug Does that "Another option you can try is to make your http.client call in your page initialization script then set the result as the value of a request attribute" mean that you can access an Endpoint with FreeMarker from within the page init script??
Related Content
- 10 years ago