why there are two duplicate metadata requests
- 2019 年 10 月 4 日
- 筆記
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://jerry.blog.csdn.net/article/details/100881265
Created by Jerry Wang, last modified on Mar 03, 2015
- ODataModel

Actually they are not duplicated:
- the first one has accept type as xml, while the second one pure text.
- the prefix of the two are different: /sap and /1sap. First request: Trigger point: main view constructor is called:

sap.ca.scfld.md.Startup.init is called in our application code:

ConnectionManager.getNewInstance is called with configuration data maintained in file Configuration.js:


OData model instance is created based on this relative url:

first request is sent out with relative url:

second request:

The application code is triggering the second request sent:

The configuration comes from component metadata:

