2015-08-22 26 views
0

如何建立與$阿賈克斯或$。員額與信息jQuery的要求:構建與jQuery Ajax請求,添加標題和正文

POST /CreateSpeech HTTP/1.1 

Host: tts.eu-west-1.ivonacloud.com 

Content-type: application/json 

X-Amz-Date: 20130913T092054Z 

Authorization: AWS4-HMAC-SHA256 Credential=12345/20130913/eu-west-1/tts/aws4_request, 

SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, 

Signature=38c394cf938da94ec503f501a91055bc9aa339d165695884b9e7e60128f6ad27 

x-amz-content-sha256: f43e25253839f2c3feae433c5e477d79f7dfafdc0e4af19a952adb44a60265ba 

Content-Length: 32 

{"Input":{"Data":"Hello world"}} 

回答

0

This has been answered here

您需要添加header屬性中的頭信息(不要放在第一行),然後像通常在data屬性中那樣處理內容。