Last active
August 29, 2015 13:55
-
-
Save mohemohe/8784196 to your computer and use it in GitHub Desktop.
Example of how to use covconv API in C#.NET .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace example_covlangAPI | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
string uri = "http://api.ghippos.net/covlang/"; | |
var wc = new System.Net.WebClient(); | |
var nvc = new System.Collections.Specialized.NameValueCollection(); | |
nvc.Add("ja_JP", "ここに原文を入力すると、こふ語になります。"); | |
byte[] resData = wc.UploadValues(uri, nvc); | |
string resText = System.Text.Encoding.UTF8.GetString(resData); | |
Console.WriteLine(resText); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment