Translations:Manual:CORS/18/en

The $ForeignApi module is an extension of $api which automatically handles the details for you.