1
我嘗試使用FRED與Hammock以使用提供的REST服務。不幸的是我不知道如何使用它。 我到目前爲止所做的:如何使用FRED Rest服務與c#
string url = "http://wit.istc.cnr.it/stlab-tools/fred/api";
Hammock.RestClient client = new Hammock.RestClient();
client.AddHeader("Accept", "image/png -F text=Miles Davis was an american jazz musician");
//client.AddHeader("Accept", "text=Miles Davis was an american jazz musician");
client.Authority = url;
Hammock.RestRequest req = new Hammock.RestRequest();
req.Path = url;
Hammock.RestResponse response = client.Request(req);
string _result = client.Request(req).Content;
謝謝!我試過你添加的代碼。我不需要憑證,或?我向兩者添加了一個空字符串。與我從FRED回來的網頁,但沒有圖像? – tro 2013-04-18 09:04:35