Pickup environment specific configuration for usage in post call via ajax
Hi All,
Suppose I want to make a post call via AJAX, from my component which takes in certain details from the user and passes it to a backend servlet hosted on some external server.
A sample snippet something like
$.ajax({
url: url,
type:"POST",
success :
.................}}
the url will be something like http://example.abc//servlet?abc=xyz
The value/probably domain for example "example.abc" will be different for different environments[dev, prod etc], which will be stored in a location say /apps/example/config.prod in the xml files[in codebase].
So, how do I pickup the corresponding environment related values and place it to form the correct url, while passing from ajax call.
Any thoughts/pointers/reference code/snippet will be helpful.