Use C++Builder, connect to AWS API Gateway API Key[JAPAN]

Posted by on in Programming

I wrote about the AWS API Gateway in my blog before.

https://community.embarcadero.com/blogs/entry/use-c-builder-connect-to-aws-api-gateway-lambda-with-json-japan

At that time I did not mention API Key.

AWS API Gateway has the ability to say that API Key.

By using this we can secure a little security.

 

Move API Key to the screen with AWS API Gateway and create API Key.

Next, go to the Usage Plans page.

Associate APIs with API Key.

In the method you want to use, set API Key to true.

Confirm whether API Key is "Required". Then, deploy it.

https://community.embarcadero.com/blogs/entry/use-c-builder-connect-to-aws-api-gateway-lambda-with-json-japan

Add 1 line to C++ code written last time.

////
net_cliant_->CustomHeaders["x-api-key"] = "**************";

API Gateway is available when CustomHeaders["x-api-key"] is included.

 



About
Gold User, No rank,
Delphi / C++Builder blogger

Comments

Check out more tips and tricks in this development video: