-
Notifications
You must be signed in to change notification settings - Fork 767
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83cb040
commit 44f479b
Showing
4 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
goog.module('grpc.web.ClientOptions'); | ||
goog.module.declareLegacyNamespace(); | ||
|
||
const {StreamInterceptor, UnaryInterceptor} = goog.require('grpc.web.Interceptor'); | ||
|
||
|
||
/** | ||
* Options that are availavle during the client construction. | ||
* @record | ||
*/ | ||
class ClientOptions { | ||
constructor() { | ||
/** | ||
* Whether to use the HttpCors library to pack http headers into a special | ||
* url query param $httpHeaders= so that browsers can bypass CORS OPTIONS | ||
* requests. | ||
* @type {boolean|undefined} | ||
*/ | ||
this.suppressCorsPreflight; | ||
|
||
/** | ||
* Whether to turn on XMLHttpRequest's withCredentials flag. | ||
* @type {boolean|undefined} | ||
*/ | ||
this.withCredentials; | ||
|
||
/** | ||
* Unary interceptors. Note that they are only available in grpcweb and | ||
* grpcwebtext mode | ||
* @type {!Array<!UnaryInterceptor>|undefined} | ||
*/ | ||
this.unaryInterceptors; | ||
|
||
/** | ||
* Stream interceptors. Note that they are only available in grpcweb and | ||
* grpcwebtext mode | ||
* @type {!Array<!StreamInterceptor>|undefined} | ||
*/ | ||
this.streamInterceptors; | ||
|
||
/** | ||
* Protocol buffer format for open source gRPC-Web. This attribute should be | ||
* specified by the gRPC-Web build rule by default. | ||
* @type {string|undefined} | ||
*/ | ||
this.format; | ||
} | ||
} | ||
|
||
exports = ClientOptions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters