GetServerUrl() -> GetClientUrl() Method
"The URL returned is the standard URL used to access the application. If you access the server locally using http://localhost or use an IP address instead of the actual name of the server, this will not be reflected in the value returned by this function. This means that if you are making web service calls or accessing web resources, the browser will apply security settings that apply to requests that cross domains. To avoid this, always connect to Microsoft Dynamics CRM using the getClientUrl method.."
The getClientUrl() method takes the local server or IP address scenarios into account, so to ensure your customizations have the necessary permissions, you will have to use the getClientUrl() function
The root cause is the getServerUrl() function mentioned above. This method will not operate in CRM 2015 as it is deprecated, so you will need to update your SDK.REST library with files from the CRM 2015 SDK.
Its also important to note that SDK.REST.js companion script, json2.js, is not necessary for using REST calls in CRM 2015
The crm.Form object that was used in CRM 4 was supported in CRM 2011 until UR 12, so it's possible that your CRM system still utilizes this code. This object has been replaced by the Xrm.Page object for CRM 2011 to CRM 2015. There are many functions in the Xrm.Page Reference page that easily replace the crm.Form object.
CRM 2015 SDK for updated SDK.REST Libraries:
Deprecated Features from CRM UR 12