forked from microsoftgraph/msgraph-sdk-javascript
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Implementation of middleware options at both client and request level 2. Added docs for the middleware options 3. Added middleware util to have utils for middlewares 4. Added public for constructor for more readability
- Loading branch information
1 parent
56d4950
commit ada88f7
Showing
50 changed files
with
698 additions
and
544 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* @module DummyHTTPMessageHandler | ||
*/ | ||
|
||
import { Context } from "../src/IContext"; | ||
import { Middleware } from "../src/middleware/IMiddleware"; | ||
|
||
/** | ||
* @class | ||
* @implements Middleware | ||
* Class representing DummyHTTPMessageHandler | ||
*/ | ||
export class DummyHTTPMessageHandler implements Middleware { | ||
|
||
/** | ||
* @public | ||
* @async | ||
* To execute the current middleware | ||
* @param {Context} context - The request context object | ||
* @returns A promise that resolves to nothing | ||
*/ | ||
public async execute(context: Context) { | ||
return; | ||
} | ||
} |
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,38 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* @module DummyHandlerOption | ||
*/ | ||
|
||
import { MiddlewareOption } from "../src/middleware/option/IMiddlewareOption"; | ||
|
||
/** | ||
* @class | ||
* @implements MiddlewareOption | ||
* Class for DummyHandlerOption | ||
*/ | ||
|
||
export class DummyHandlerOption implements MiddlewareOption { | ||
|
||
/** | ||
* @public | ||
* A member holding a dummy string | ||
*/ | ||
public dummyString: string; | ||
|
||
/** | ||
* @public | ||
* @async | ||
* To create an instance of DummyHandlerOption | ||
* @param {string} dummyString - The dummy string | ||
* @returns An instance of DummyHandlerOption | ||
*/ | ||
public constructor(dummyString: string = "dummy") { | ||
this.dummyString = dummyString; | ||
} | ||
} |
Oops, something went wrong.