天天看點

關于 SAP 電商雲首頁加載時觸發的 OCC API 請求

當我通路本地啟動的 SAP Spartacus Storefront 時,在 Chrome 開發者工具裡觀察到總共 23 個 OCC API 調用:

http://localhost:4200/electronics-spa/en/USD/

關于 SAP 電商雲首頁加載時觸發的 OCC API 請求
關于 SAP 電商雲首頁加載時觸發的 OCC API 請求
關于 SAP 電商雲首頁加載時觸發的 OCC API 請求
關于 SAP 電商雲首頁加載時觸發的 OCC API 請求

在該 pages OCC API 調用結束之後,其他 22 個 OCC API 才能觸發。

第二組:包含五個請求

(1) /occ/v2/electronics-spa/languages?lang=en&curr=USD

request header:Cache-Control: no-cache

response header:public, max-age=1800

(2) /occ/v2/electronics-spa/currencies?lang=en&curr=USD

(3) /occ/v2/electronics-spa/cms/components?fields=DEFAULT¤tPage=0&pageSize=26&componentIds=AllBrandsCategoryLink%2CCanonBrandCategoryLink%2CSonyBrandCategoryLink%2CKodakBrandCategoryLink%2CSamsungBrandCategoryLink%2CToshibaBrandCategoryLink%2CFujifilmBrandCategoryLink%2CKingstonBrandCategoryLink%2CIciduBrandCategoryLink%2CTDKBrandCategoryLink%2CSweexBrandCategoryLink%2CDigitalCamerasCategoryLink%2CDigitalCompactsCategoryLink%2CDigitalSLRCategoryLink%2CFilmCamerasCategoryLink%2CHandheldCamcordersCategoryLink%2CWebcamsCategoryLink%2CCameraAccessoriesCategoryLink%2CCamerasFlashesCategoryLink%2CTripodsCategoryLink%2CCameraLensesCategoryLink%2CFlashMemoryCategoryLink%2CPowerSuppliesCategoryLink%2CColourFilmsCategoryLink%2CBlackAndWhiteFilmsCategoryLink%2CBlankVideotapesCategoryLink&lang=en&curr=USD

response header:private

(4) /occ/v2/electronics-spa/cms/components?fields=DEFAULT¤tPage=0&pageSize=8&componentIds=AboutSAPCommerceLink%2CFAQLink%2CVisitSAPLink%2CContactUsLink%2CAgileCommerceBlogLink%2CLinkedInLink%2CFacebookLink%2CTwitterLink&lang=en&curr=USD

(5) /occ/v2/electronics-spa/users/anonymous/consenttemplates?lang=en&curr=USD

response header:no-cache, no-store, max-age=0, must-revalidate

第三組:包含 17 個請求

/occ/v2/electronics-spa/products/?fields=code,configurable,configuratorType,name,summary,price(formattedValue),images(DEFAULT,galleryIndex),baseProduct&lang=en&curr=USD

response header:private, max-age=120

關于 SAP 電商雲首頁加載時觸發的 OCC API 請求

繼續閱讀