0
我正在嘗試使用tclcurl與Web服務進行交互。但是,我無法構建帶有標題的發佈請求(相當於命令行中的-H
)。 我無法提供示例代碼,因爲我使用的端點未公開。tcl curl post標題請求
我這樣做是這樣的:
set curlHandle [curl::init]
$curlHandle configure -url $url -bodyvar html -post 1 -postfields $data -header "header1: value1" -header "header2: value2"
而且它抱怨-header
沒有被識別爲選擇,它應該是一個選項列表和頭是其中之一。