如何使用Google翻译API v2库指定POST方法而不是GET

时间:2013-02-14 17:31:43

标签: c# .net google-translate

我需要能够使用Google翻译API v2库指定POST方法而不是GET。 这是我的代码:

Google.Apis.Translate.v2.TranslationsResource.ListRequest request =  this.client.Translations.List( cadena, idiomaDestino );
request.Source = idiomaOriginal;
request.Format = Google.Apis.Translate.v2.TranslationsResource.Format.Html;
TranslationsListResponse response = request.Fetch();
if ( response.Translations.Count > 0 )
{
    //Do something with the translations
}

0 个答案:

没有答案