我正在学习 Amazon Rekognition API。我想知道是否可以通过 curl 调用 Amazon Rekognition API?
问问题
1070 次
1 回答
2
你当然可以。下面是如何构建 curl 请求的示例
curl -X POST \
https://rekognition.us-east-1.amazonaws.com \
-H 'Authorization: AWS4-HMAC-SHA256 Credential=**accessKey**/20180930/us-east-1/rekognition/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=**signature**' \
-H 'Content-Length: **body legnth**' \
-H 'content-type: application/x-amz-json-1.1' \
-H 'host: rekognition.us-east-1.amazonaws.com' \
-H 'x-amz-date: 20180930T143928Z' \
-H 'x-amz-target: RekognitionService.DetectLabels' \
-d '{"Image":{"S3Object":{"Bucket":"**bucket name**", "Name":"**file name**"}}}'
于 2018-09-30T14:47:33.420 回答