Showing posts with label http. Show all posts
Showing posts with label http. Show all posts

Monday, June 19, 2017

Youdao Dictionary API

http://dict.youdao.com/jsonapi?q=nice&keyfrom=deskdict.mini&dogVersion=1.0&dogui%20=%20json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts=%7B%22count%22%3A4%2C%22dicts%22%3A%5B%5B%22ec%22%2C%22ce%22%2C%22cj%22%2C%22jc%22%2C%22ck%22%2C%22kc%22%2C%22cf%22%2C%22fc%22%20%2C%20%22multle%22%20%5D%2C%5B%22web_trans%22%5D%2C%5B%22fanyi%22%5D%2C%5B%22typos%22%5D%5D%7D&LTH=47

Decode:
http://dict.youdao.com/jsonapi?q=nice&keyfrom=deskdict.mini&dogVersion=1.0&dogui = json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts={"count":4,"dicts":[["ec","ce","cj","jc","ck","kc","cf","fc" , "multle" ],["web_trans"],["fanyi"],["typos"]]}&LTH=47

http://dict.youdao.com/jsonapi?q=good&keyfrom=deskdict.main&dogVersion=1.0&dogui=json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts=%7B%22count%22%3A12%2C%22dicts%22%3A%5B%5B%22newjc%22%5D%2C%5B%22newcj%22%5D%2C%5B%22auth_sents_part%22%5D%2C%20%5B%22longman%22%5D%20%2C%20%5B%22collins%22%5D%20%2C%20%5B%22ec21%22%5D%2C%5B%22hh%22%5D%2C%5B%22ee%22%5D%2C%5B%22media_sents_part%22%5D%2C%5B%22rel_word%22%5D%2C%5B%22special%22%5D%2C%5B%22syno%22%5D%5D%7D&LTH=1828

Decode:
http://dict.youdao.com/jsonapi?q=good&keyfrom=deskdict.main&dogVersion=1.0&dogui=json&client=deskdict&id=b1915e13d589286bf&vendor=unknown&in=YoudaoDictSetup&appVer=7.2.0.0511&appZengqiang=0&abTest=&le=en&dicts={"count":12,"dicts":[["newjc"],["newcj"],["auth_sents_part"], ["longman"] , ["collins"] , ["ec21"],["hh"],["ee"],["media_sents_part"],["rel_word"],["special"],["syno"]]}&LTH=1828

http://dict.youdao.com/jsonapi?q=good&le=en&dicts={%22count%22:12,%22dicts%22:[[%22newjc%22],[%22newcj%22],[%22auth_sents_part%22],%20[%22longman%22]%20,%20[%22collins%22]%20,%20[%22ec21%22],[%22hh%22],[%22ee%22],[%22media_sents_part%22],[%22rel_word%22],[%22special%22],[%22syno%22]]}

Decode:
http://dict.youdao.com/jsonapi?q=good&le=en&dicts={"count":12,"dicts":[["newjc"],["newcj"],["auth_sents_part"], ["longman"] , ["collins"] , ["ec21"],["hh"],["ee"],["media_sents_part"],["rel_word"],["special"],["syno"]]}

http://dict.youdao.com/jsonapi?q=good&le=en&dicts={"count":1,"dicts":[["collins"]]}

@url encode/decode

Thursday, June 8, 2017

GET vs. POST

@reference_1_diffen.com
GET vs. POST
@reference_2_javatpoint.com
Get vs. Post
@reference_3_stackoverflow
What is the difference between POST and GET?
@reference_4_w3schools
HTTP Methods: GET vs. POST

@refernce_5_stackoverflow
What does enctype='multipart/form-data' mean?

Content-Type & MIME types


Content Type is also known as MIME (Multipurpose internet Mail Extension) Type. It is a HTTP header that provides the description about what are you sending to the browser.
MIME is an internet standard that is used for extending the limited capabilities of email by allowing the insertion of sounds, images and text in a message.
The features provided by MIME to the email services are as given below:
  • It supports the non-ASCII characters
  • It supports the multiple attachments in a single message
  • It supports the attachment which contains executable audio, images and video files etc.
  • It supports the unlimited message length.
@reference_1_javatpoint
Content Type
@reference_2_developer.mozilla.org
Content-Type
@reference_3_developer.mozilla.org
MIME types

What is a MIME type?

MIME stands for "Multipurpose Internet Mail Extensions. It's a way of identifying files on the Internet according to their nature and format. For example, using the "Content-type" header value defined in a HTTP response, the browser can open the file with the proper extension/plugin.

What is an Internet Media Type?

"Internet Media Type" is the same as a MIME type. MIME types were originally created for emails sent using the SMTP protocol. Nowadays, this standard is used in a lot of other protocols, hence the new naming convention "Internet Media Type".

What is a Content-Type?

A "Content-type" is simply a header defined in many protocols, such as HTTP, that makes use of MIME types to specify the nature of the file currently being handled.

What does a MIME type look like?

A MIME type is a string identifier composed of two parts: a "type" and a "subtype". The "type" refers to a logical grouping of many MIME types that are closely related to each other; it's no more than a high level category. "subtypes" are specific to one file type within the "type".
For example, the MIME value "application/xml" is used for XML documents and specifies that the "xml" subtype belongs in the "application" type.

Why are some MIME subtypes prefixed with "x-"?

The "x-" prefix of a MIME subtype simply means that it's non-standard, i.e. not registered with the "Internet Assigned Numbers Authority" (IANA).

Why are some MIME subtypes prefixed with "vnd"?

The "vnd" prefix means that the MIME value is vendor specific.

How can I set the Content-type header of my files?

It depends on the programming language you are using. Note that most language have a default "Content-type" of "text/html".
  • Setting the Content-type in Java:

    // Response is of type javax.servlet.ServletReponse
    response.setContentType("text/plain");
  • Setting the Content-type in PHP:

    <?php header('Content-type: text/html');?>
 @reference_4_freeformatter
MIME Types List
@reference_5_stackoverflow
What are all the possible values for HTTP “Content-Type” header?