Skip to content
Search

Microsoft Translator

lastmod 2020-10-18created 2015-02-265 edits

HTTP Example

When using HTTP basic authentication, the request is sent as follows.

GET https://api.datamarket.azure.com/Bing/MicrosoftTranslator/Translate()?Text='Rule'&To='ko'&From='en' HTTP/1.1
User-Agent: Microsoft ADO.NET Data Services
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
Accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
Authorization: Basic VA9EG3c2VWlNLzEaWAFtcktpNGNXRjBjZjVnAU5LVXlCMzZrdFdYUDxJNEpVT0RrdzZVaU0vNFpaYW1yS2k0Y1dGMGNmNWdpTktVeUIzNmt0V1hSTEk0
Host: api.datamarket.azure.com

The Basic value in Authorization is encoded in Base64(the value above is a dummy); just encode a string in the form ID:PW. Note that ID is currently unused 1, so sending PW:PW also works.

Also, URI parameters must be wrapped in single quotes (').

Favorite site

Developer

MSDN

References


  1. https://msdn.microsoft.com/ko-kr/library/azure/gg193417.aspx ↩

  2. Walkthrough_Microsoft_Translator_in_a_CSharp_Console_Application.zip ↩