javascript – gapi.load versus gapi.client.load
javascript – gapi.load versus gapi.client.load
As indicated by the CORS documentation, the gapi.load
function is used to dynamically load specific JavaScript libraries.
As documented in the description of the gapi.client.load
function (which is provided by the client JS library), gapi.client.load
is used to build a JavaScript interface for accessing specific HTTP(S) APIs; you can also do this sort of thing yourself using API discovery (search for it to find docs) and sending API requests directly with gapi.client.request
or CORS.
Edit: added clarification based on Brian Slesinskys follow-up comment and made minor wording changes.