File tree Expand file tree Collapse file tree
gcloud-java-datastore/src/main/java/com/google/cloud/datastore/spi Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717package com .google .cloud .datastore .spi ;
1818
19+ import com .google .api .client .http .HttpTransport ;
1920import com .google .cloud .datastore .DatastoreException ;
2021import com .google .cloud .datastore .DatastoreOptions ;
2122import com .google .datastore .v1beta3 .AllocateIdsRequest ;
@@ -40,10 +41,12 @@ public class DefaultDatastoreRpc implements DatastoreRpc {
4041 private final com .google .datastore .v1beta3 .client .Datastore client ;
4142
4243 public DefaultDatastoreRpc (DatastoreOptions options ) {
44+ HttpTransport transport = options .httpTransportFactory ().create ();
4345 com .google .datastore .v1beta3 .client .DatastoreOptions .Builder clientBuilder =
4446 new com .google .datastore .v1beta3 .client .DatastoreOptions .Builder ()
4547 .projectId (options .projectId ())
46- .initializer (options .httpRequestInitializer ());
48+ .initializer (options .httpRequestInitializer ())
49+ .transport (transport );
4750 String normalizedHost = options .host () != null ? options .host ().toLowerCase () : "" ;
4851 if (isLocalHost (normalizedHost )) {
4952 clientBuilder = clientBuilder .localHost (removeScheme (normalizedHost ));
You can’t perform that action at this time.
0 commit comments