Class HttpIntegration
You can integrate an API method with an HTTP endpoint using the HTTP proxy integration or the HTTP custom integration,.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HttpIntegration : Integration
Syntax (vb)
Public Class HttpIntegration
Inherits Integration
Remarks
With the proxy integration, the setup is simple. You only need to set the HTTP method and the HTTP endpoint URI, according to the backend requirements, if you are not concerned with content encoding or caching.
With the custom integration, the setup is more involved. In addition to the proxy integration setup steps, you need to specify how the incoming request data is mapped to the integration request and how the resulting integration response data is mapped to the method response.
ExampleMetadata: infused
Examples
Function authFn;
Resource books;
var auth = new RequestAuthorizer(this, "booksAuthorizer", new RequestAuthorizerProps {
Handler = authFn,
IdentitySources = new [] { IdentitySource.Header("Authorization") }
});
books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
Authorizer = auth
});
Synopsis
Constructors
HttpIntegration(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpIntegration(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
HttpIntegration(String, IHttpIntegrationProps) |
Constructors
HttpIntegration(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpIntegration(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpIntegration(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpIntegration(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
HttpIntegration(String, IHttpIntegrationProps)
public HttpIntegration(string url, IHttpIntegrationProps props = null)
Parameters
- url System.String
- props IHttpIntegrationProps