Google Translate V2 cannot hanlde large text translations from C#

后端 未结 3 799
一生所求
一生所求 2020-12-11 04:56

I\'ve implemented C# code using the Google Translation V2 api with the GET Method. It successfully translates small texts but when increasing the text length and it takes 1,

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 05:35

    ? What? it is trivial to post using C# - it is right there in the documentation.

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
    {
        // Set type to POST
        request.Method = "POST";
    

    From there on you bascially put the data into fom fields into the content stream.

    This is not "simulate a post meethod", it is fully doing a post request as per specifications.

    Btw. hwhere does json enter here? You say "in C#". There is no need to use json?

提交回复
热议问题