You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update batch.md with discovery generated API sample
Remove httpBatch.html sample since it is duplicative of batch.md and out
of date(plus API does not exist anymore)
Copy file name to clipboardExpand all lines: docs/batch.md
+11-12
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,12 @@ The JavaScript client library supports batching HTTP requests to make multiple A
7
7
The JavaScript client library defines an object called `Batch`. You can start by instantiating this object:
8
8
9
9
```js
10
-
var batch =gapi.client.newBatch();
10
+
constbatch=gapi.client.newBatch();
11
11
```
12
12
13
13
## Adding requests to the batch
14
14
15
-
Use the `Batch` object's [`add`](reference.md#----gapiclientbatchaddrequestopt_params--) method to add individual HTTP requests. The `add` method supports one optional parameter:
15
+
Use the `Batch` object's [`add`](reference.md#----gapiclientbatchaddrequestopt_params--) method to add individual HTTP requests. Only requests created via [discovery](discovery.md) should be added to a batch. The `add` method supports one optional parameter:
16
16
17
17
<table>
18
18
<colgroup>
@@ -49,19 +49,18 @@ Use the `Batch` object's [`add`](reference.md#----gapiclientbatchaddrequestopt_p
0 commit comments