1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/xrkj-vue-cli-vant-starter

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
通讯报文格式.html 31 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
张鑫 Отправлено 17.02.2020 15:40 b63b3f7
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972
<!DOCTYPE html>
<!-- saved from url=(0064)file:///C:/Users/king/AppData/Local/Temp/MarkdownPadPreview.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>通讯报文格式</title>
<style type="text/css">
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
}
/* BODY
=============================================================================*/
body {
font-family: Helvetica, arial, freesans, clean, sans-serif;
font-size: 14px;
line-height: 1.6;
color: #333;
background-color: #fff;
padding: 20px;
max-width: 960px;
margin: 0 auto;
}
body>*:first-child {
margin-top: 0 !important;
}
body>*:last-child {
margin-bottom: 0 !important;
}
/* BLOCKS
=============================================================================*/
p, blockquote, ul, ol, dl, table, pre {
margin: 15px 0;
}
/* HEADERS
=============================================================================*/
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}
h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}
h1 {
font-size: 28px;
color: #000;
}
h2 {
font-size: 24px;
border-bottom: 1px solid #ccc;
color: #000;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777;
font-size: 14px;
}
body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
margin-top: 0;
padding-top: 0;
}
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}
h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top: 10px;
}
/* LINKS
=============================================================================*/
a {
color: #4183C4;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* LISTS
=============================================================================*/
ul, ol {
padding-left: 30px;
}
ul li > :first-child,
ol li > :first-child,
ul li ul:first-of-type,
ol li ol:first-of-type,
ul li ol:first-of-type,
ol li ul:first-of-type {
margin-top: 0px;
}
ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}
dl {
padding: 0;
}
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}
dl dt:first-child {
padding: 0;
}
dl dt>:first-child {
margin-top: 0px;
}
dl dt>:last-child {
margin-bottom: 0px;
}
dl dd {
margin: 0 0 15px;
padding: 0 15px;
}
dl dd>:first-child {
margin-top: 0px;
}
dl dd>:last-child {
margin-bottom: 0px;
}
/* CODE
=============================================================================*/
pre, code, tt {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
code, tt {
margin: 0 0px;
padding: 0px 0px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}
pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}
pre code, pre tt {
background-color: transparent;
border: none;
}
kbd {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #DDDDDD;
background-image: linear-gradient(#F1F1F1, #DDDDDD);
background-repeat: repeat-x;
border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
border-image: none;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 10px;
padding: 1px 4px;
}
/* QUOTES
=============================================================================*/
blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}
blockquote>:first-child {
margin-top: 0px;
}
blockquote>:last-child {
margin-bottom: 0px;
}
/* HORIZONTAL RULES
=============================================================================*/
hr {
clear: both;
margin: 15px 0;
height: 0px;
overflow: hidden;
border: none;
background: transparent;
border-bottom: 4px solid #ddd;
padding: 0;
}
/* TABLES
=============================================================================*/
table th {
font-weight: bold;
}
table th, table td {
border: 1px solid #ccc;
padding: 6px 13px;
}
table tr {
border-top: 1px solid #ccc;
background-color: #fff;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
/* IMAGES
=============================================================================*/
img {
max-width: 100%
}
</style>
<style type="text/css">
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
.pl-c {
color: #969896;
}
.pl-c1,.pl-mdh,.pl-mm,.pl-mp,.pl-mr,.pl-s1 .pl-v,.pl-s3,.pl-sc,.pl-sv {
color: #0086b3;
}
.pl-e,.pl-en {
color: #795da3;
}
.pl-s1 .pl-s2,.pl-smi,.pl-smp,.pl-stj,.pl-vo,.pl-vpf {
color: #333;
}
.pl-ent {
color: #63a35c;
}
.pl-k,.pl-s,.pl-st {
color: #a71d5d;
}
.pl-pds,.pl-s1,.pl-s1 .pl-pse .pl-s2,.pl-sr,.pl-sr .pl-cce,.pl-sr .pl-sra,.pl-sr .pl-sre,.pl-src,.pl-v {
color: #df5000;
}
.pl-id {
color: #b52a1d;
}
.pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.pl-ml {
color: #693a17;
}
.pl-mh,.pl-mh .pl-en,.pl-ms {
color: #1d3e81;
font-weight: bold;
}
.pl-mq {
color: #008080;
}
.pl-mi {
color: #333;
font-style: italic;
}
.pl-mb {
color: #333;
font-weight: bold;
}
.pl-md,.pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.pl-mdht,.pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.pl-mdr {
color: #795da3;
font-weight: bold;
}
.pl-mo {
color: #1d3e81;
}
.task-list {
padding-left:10px;
margin-bottom:0;
}
.task-list li {
margin-left: 20px;
}
.task-list-item {
list-style-type:none;
padding-left:10px;
}
.task-list-item label {
font-weight:400;
}
.task-list-item.enabled label {
cursor:pointer;
}
.task-list-item+.task-list-item {
margin-top:3px;
}
.task-list-item-checkbox {
display:inline-block;
margin-left:-20px;
margin-right:3px;
vertical-align:1px;
}
</style>
<!--<base href="file:\\\D:\Codes\coo\coo\docs\">--><base href=".">
</head>
<body>
<h3 id="-">概述</h3>
<p>此文档列举了前后端通讯时的几种报文格式。</p>
<h3 id="-url-">请求URL格式</h3>
<p>请求URL类似于:<code>http[s]://IP:Port/a/d/c</code>,其中<code>http[s]://IP:Port</code>是相对固定的,可做常量配置。</p>
<h3 id="-">报文基本格式</h3>
<h5 id="-">请求包括</h5>
<ol>
<li>请求方法:<ul>
<li>GET 一般用户读数据</li><li>POST/PUT 一般用于创建或者更新数据</li><li>DELETE 一般用于删除数据</li></ul>
</li><li>请求头,即Header部分:<ul>
<li>X-AUTH-TOKEN:用于传递请求token</li><li>Content-Type:见报文</li><li>Accept:见报文</li></ul>
</li><li>请求体<ul>
<li>form格式或者json格式</li></ul>
</li></ol>
<h5 id="-">响应</h5>
<ol>
<li>HTTP状态码,见码表<ul>
<li>做响应处理时,应该首先判断HTTP状态码</li></ul>
</li><li>响应头<ul>
<li>处理响应体时,应该首先确定<code>Content-Type</code></li></ul>
</li><li>响应体<ul>
<li>根据响应头中的<code>Content-Type</code>处理</li><li>注意:业务异常时,有个<code>bizcode</code>可以做业务处理</li><li>注意:业务异常或者系统异常时,有个<code>ddzcode</code>标记出问题的系统</li></ul>
</li></ol>
<h3 id="-">报文</h3>
<h4 id="-">正常报文</h4>
<p>正常的请求,返回状态码一般为<code>2xx</code>,可能不仅仅是<code>200</code><br>正常的请求,前端直接处理返回数据即可。</p>
<pre><code>请求:
curl --include --location --request GET 'http://127.0.0.1:9000/api/test/link/get'
或者:
curl --include --location --request GET 'http://127.0.0.1:9000/api/test/link/get?test1=123123'
响应:
HTTP/1.1 200 OK
transfer-encoding: chunked
Content-Type: application/json;charset=UTF-8
Date: Sat, 15 Feb 2020 21:25:16 GMT
{"key_a1":"中文val"}
</code></pre><pre><code>请求:
curl --include --location --request POST 'http://127.0.0.1:9000/api/test/link/post' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
"test1": "中文",
"test2": "23a324"
}'
响应:
HTTP/1.1 200 OK
transfer-encoding: chunked
Content-Type: application/json;charset=UTF-8
Date: Sat, 15 Feb 2020 21:27:57 GMT
{"key_a1":"中文val"}
</code></pre><pre><code>请求:
curl --include --location --request POST 'http://127.0.0.1:9000/api/test/link/post' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'test1=中文' \
--data-urlencode 'test2=123'
响应:
HTTP/1.1 200 OK
transfer-encoding: chunked
Content-Type: application/json;charset=UTF-8
Date: Sat, 15 Feb 2020 21:40:33 GMT
{"key_a1":"中文val"}
</code></pre><p>注意:Content-Type: application/json; charset=utf-8或者Content-Type: application/x-www-form-urlencoded会对服务器取值造成影响!使用时需和后端商议妥当。</p>
<h4 id="-">业务异常报文</h4>
<p>业务异常代表程序在处理业务时,遇到条件不符合的情况,而终止了请求,比如:用户年龄大于xx、身份证格式不符合等;<br>注意<code>bizcode</code>,后端可以设置<code>bizcode</code>和前端通讯,前端可以利用这个<code>bizcode</code>做一些判断操作;<br>业务异常一般都是<code>4xx</code>的状态码;<br>业务异常一般直接判断提示<code>message</code>字段返回的内容即可。</p>
<pre><code>请求:
curl --include --location --request POST 'http://127.0.0.1:9000/api/test/link/post' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw '{
"test1": "中文",
"test2": "23a324"
}'
响应:
HTTP/1.1 402 Payment Required
Content-Type: application/json;charset=UTF-8
Content-Length: 163
{"timestamp":"2020-02-16T20:36:32.818+0000","path":"/api/test/link/get","status":402,"error":"Payment Required","message":"错误测试","bizcode":221,"ddzcode":0}
</code></pre><h4 id="-">系统代码异常报文</h4>
<p>系统代码异常表示后端系统在编码上出现了错误,这种情况应该友好的提示前端用户。</p>
<pre><code>请求:
curl --include --location --request GET 'http://127.0.0.1:9000/api/test/link/get?test1=123123'
响应:
HTTP/1.1 500 Internal Server Error
Content-Type: application/json;charset=UTF-8
Content-Length: 156
{"timestamp":"2020-02-16T20:34:59.857+0000","path":"/api/test/link/get","status":500,"error":"Internal Server Error","message":null,"bizcode":0,"ddzcode":0}
</code></pre><p><strong>注意</strong><br>不管是业务异常还是系统异常,皆有一个<code>ddzcode</code>错误码,此错误码代表发生问题的系统,比如,系统后台调用了核心系统,当因为核心系统的问题,发生错误时,此<code>ddzcode</code>会返回代表核心系统的码值,方便前端提示给用户到底是哪个系统出现了问题;具体码值,前后端开发时商议而定。</p>
<h4 id="-">其他报文</h4>
<h5 id="-accept-application-json-"><code>Accept</code>目前只支持<code>application/json</code></h5>
<pre><code>请求:(注意Accept设置后的响应!)
curl --include --location --request POST 'http://127.0.0.1:9000/api/test/link/post' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'Accept: text/plain' \
--data-raw '{
"test1": "中文",
"test2": "23a324"
}'
响应:
HTTP/1.1 406 Not Acceptable
Content-Length: 0
Date: Sat, 15 Feb 2020 21:33:43 GMT
</code></pre><pre><code>请求:
curl --include --location --request POST 'http://127.0.0.1:9000/api/test/link/post' \
&gt; --header 'Content-Type: application/json; charset=utf-8' \
&gt; --header 'Accept: application/json; charset=utf-8' \
&gt; --data-raw '{
&gt; "test1": "中文",
&gt; "test2": "23a324"
&gt; }'
响应:
HTTP/1.1 200 OK
transfer-encoding: chunked
Content-Type: application/json;charset=utf-8
Date: Sat, 15 Feb 2020 21:35:12 GMT
{"key_a1":"中文val"}
</code></pre><h3 id="http-">HTTP码表</h3>
<p>至多返回这些,不会超过下表,但是最常用的还是<code>200</code><code>400</code><code>401</code><code>403</code><code>404</code><code>405</code><code>500</code></p>
<pre><code>// 1xx Informational
/**
* {@code 100 Continue}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.2.1"&gt;HTTP/1.1: Semantics and Content, section 6.2.1&lt;/a&gt;
*/
CONTINUE(100, "Continue"),
/**
* {@code 101 Switching Protocols}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.2.2"&gt;HTTP/1.1: Semantics and Content, section 6.2.2&lt;/a&gt;
*/
SWITCHING_PROTOCOLS(101, "Switching Protocols"),
/**
* {@code 102 Processing}.
* @see &lt;a href="https://tools.ietf.org/html/rfc2518#section-10.1"&gt;WebDAV&lt;/a&gt;
*/
PROCESSING(102, "Processing"),
/**
* {@code 103 Checkpoint}.
* @see &lt;a href="https://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal"&gt;A proposal for supporting
* resumable POST/PUT HTTP requests in HTTP/1.0&lt;/a&gt;
*/
CHECKPOINT(103, "Checkpoint"),
// 2xx Success
/**
* {@code 200 OK}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.3.1"&gt;HTTP/1.1: Semantics and Content, section 6.3.1&lt;/a&gt;
*/
OK(200, "OK"),
/**
* {@code 201 Created}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.3.2"&gt;HTTP/1.1: Semantics and Content, section 6.3.2&lt;/a&gt;
*/
CREATED(201, "Created"),
/**
* {@code 202 Accepted}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.3.3"&gt;HTTP/1.1: Semantics and Content, section 6.3.3&lt;/a&gt;
*/
ACCEPTED(202, "Accepted"),
/**
* {@code 203 Non-Authoritative Information}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.3.4"&gt;HTTP/1.1: Semantics and Content, section 6.3.4&lt;/a&gt;
*/
NON_AUTHORITATIVE_INFORMATION(203, "Non-Authoritative Information"),
/**
* {@code 204 No Content}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.3.5"&gt;HTTP/1.1: Semantics and Content, section 6.3.5&lt;/a&gt;
*/
NO_CONTENT(204, "No Content"),
/**
* {@code 205 Reset Content}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.3.6"&gt;HTTP/1.1: Semantics and Content, section 6.3.6&lt;/a&gt;
*/
RESET_CONTENT(205, "Reset Content"),
/**
* {@code 206 Partial Content}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7233#section-4.1"&gt;HTTP/1.1: Range Requests, section 4.1&lt;/a&gt;
*/
PARTIAL_CONTENT(206, "Partial Content"),
/**
* {@code 207 Multi-Status}.
* @see &lt;a href="https://tools.ietf.org/html/rfc4918#section-13"&gt;WebDAV&lt;/a&gt;
*/
MULTI_STATUS(207, "Multi-Status"),
/**
* {@code 208 Already Reported}.
* @see &lt;a href="https://tools.ietf.org/html/rfc5842#section-7.1"&gt;WebDAV Binding Extensions&lt;/a&gt;
*/
ALREADY_REPORTED(208, "Already Reported"),
/**
* {@code 226 IM Used}.
* @see &lt;a href="https://tools.ietf.org/html/rfc3229#section-10.4.1"&gt;Delta encoding in HTTP&lt;/a&gt;
*/
IM_USED(226, "IM Used"),
// 3xx Redirection
/**
* {@code 300 Multiple Choices}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.4.1"&gt;HTTP/1.1: Semantics and Content, section 6.4.1&lt;/a&gt;
*/
MULTIPLE_CHOICES(300, "Multiple Choices"),
/**
* {@code 301 Moved Permanently}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.4.2"&gt;HTTP/1.1: Semantics and Content, section 6.4.2&lt;/a&gt;
*/
MOVED_PERMANENTLY(301, "Moved Permanently"),
/**
* {@code 302 Found}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.4.3"&gt;HTTP/1.1: Semantics and Content, section 6.4.3&lt;/a&gt;
*/
FOUND(302, "Found"),
/**
* {@code 302 Moved Temporarily}.
* @see &lt;a href="https://tools.ietf.org/html/rfc1945#section-9.3"&gt;HTTP/1.0, section 9.3&lt;/a&gt;
* @deprecated in favor of {@link #FOUND} which will be returned from {@code HttpStatus.valueOf(302)}
*/
@Deprecated
MOVED_TEMPORARILY(302, "Moved Temporarily"),
/**
* {@code 303 See Other}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.4.4"&gt;HTTP/1.1: Semantics and Content, section 6.4.4&lt;/a&gt;
*/
SEE_OTHER(303, "See Other"),
/**
* {@code 304 Not Modified}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7232#section-4.1"&gt;HTTP/1.1: Conditional Requests, section 4.1&lt;/a&gt;
*/
NOT_MODIFIED(304, "Not Modified"),
/**
* {@code 305 Use Proxy}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.4.5"&gt;HTTP/1.1: Semantics and Content, section 6.4.5&lt;/a&gt;
* @deprecated due to security concerns regarding in-band configuration of a proxy
*/
@Deprecated
USE_PROXY(305, "Use Proxy"),
/**
* {@code 307 Temporary Redirect}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.4.7"&gt;HTTP/1.1: Semantics and Content, section 6.4.7&lt;/a&gt;
*/
TEMPORARY_REDIRECT(307, "Temporary Redirect"),
/**
* {@code 308 Permanent Redirect}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7238"&gt;RFC 7238&lt;/a&gt;
*/
PERMANENT_REDIRECT(308, "Permanent Redirect"),
// --- 4xx Client Error ---
/**
* {@code 400 Bad Request}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.1"&gt;HTTP/1.1: Semantics and Content, section 6.5.1&lt;/a&gt;
*/
BAD_REQUEST(400, "Bad Request"),
/**
* {@code 401 Unauthorized}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7235#section-3.1"&gt;HTTP/1.1: Authentication, section 3.1&lt;/a&gt;
*/
UNAUTHORIZED(401, "Unauthorized"),
/**
* {@code 402 Payment Required}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.2"&gt;HTTP/1.1: Semantics and Content, section 6.5.2&lt;/a&gt;
*/
PAYMENT_REQUIRED(402, "Payment Required"),
/**
* {@code 403 Forbidden}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.3"&gt;HTTP/1.1: Semantics and Content, section 6.5.3&lt;/a&gt;
*/
FORBIDDEN(403, "Forbidden"),
/**
* {@code 404 Not Found}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.4"&gt;HTTP/1.1: Semantics and Content, section 6.5.4&lt;/a&gt;
*/
NOT_FOUND(404, "Not Found"),
/**
* {@code 405 Method Not Allowed}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.5"&gt;HTTP/1.1: Semantics and Content, section 6.5.5&lt;/a&gt;
*/
METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
/**
* {@code 406 Not Acceptable}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.6"&gt;HTTP/1.1: Semantics and Content, section 6.5.6&lt;/a&gt;
*/
NOT_ACCEPTABLE(406, "Not Acceptable"),
/**
* {@code 407 Proxy Authentication Required}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7235#section-3.2"&gt;HTTP/1.1: Authentication, section 3.2&lt;/a&gt;
*/
PROXY_AUTHENTICATION_REQUIRED(407, "Proxy Authentication Required"),
/**
* {@code 408 Request Timeout}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.7"&gt;HTTP/1.1: Semantics and Content, section 6.5.7&lt;/a&gt;
*/
REQUEST_TIMEOUT(408, "Request Timeout"),
/**
* {@code 409 Conflict}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.8"&gt;HTTP/1.1: Semantics and Content, section 6.5.8&lt;/a&gt;
*/
CONFLICT(409, "Conflict"),
/**
* {@code 410 Gone}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.9"&gt;
* HTTP/1.1: Semantics and Content, section 6.5.9&lt;/a&gt;
*/
GONE(410, "Gone"),
/**
* {@code 411 Length Required}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.10"&gt;
* HTTP/1.1: Semantics and Content, section 6.5.10&lt;/a&gt;
*/
LENGTH_REQUIRED(411, "Length Required"),
/**
* {@code 412 Precondition failed}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7232#section-4.2"&gt;
* HTTP/1.1: Conditional Requests, section 4.2&lt;/a&gt;
*/
PRECONDITION_FAILED(412, "Precondition Failed"),
/**
* {@code 413 Payload Too Large}.
* @since 4.1
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.11"&gt;
* HTTP/1.1: Semantics and Content, section 6.5.11&lt;/a&gt;
*/
PAYLOAD_TOO_LARGE(413, "Payload Too Large"),
/**
* {@code 413 Request Entity Too Large}.
* @see &lt;a href="https://tools.ietf.org/html/rfc2616#section-10.4.14"&gt;HTTP/1.1, section 10.4.14&lt;/a&gt;
* @deprecated in favor of {@link #PAYLOAD_TOO_LARGE} which will be
* returned from {@code HttpStatus.valueOf(413)}
*/
@Deprecated
REQUEST_ENTITY_TOO_LARGE(413, "Request Entity Too Large"),
/**
* {@code 414 URI Too Long}.
* @since 4.1
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.12"&gt;
* HTTP/1.1: Semantics and Content, section 6.5.12&lt;/a&gt;
*/
URI_TOO_LONG(414, "URI Too Long"),
/**
* {@code 414 Request-URI Too Long}.
* @see &lt;a href="https://tools.ietf.org/html/rfc2616#section-10.4.15"&gt;HTTP/1.1, section 10.4.15&lt;/a&gt;
* @deprecated in favor of {@link #URI_TOO_LONG} which will be returned from {@code HttpStatus.valueOf(414)}
*/
@Deprecated
REQUEST_URI_TOO_LONG(414, "Request-URI Too Long"),
/**
* {@code 415 Unsupported Media Type}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.13"&gt;
* HTTP/1.1: Semantics and Content, section 6.5.13&lt;/a&gt;
*/
UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"),
/**
* {@code 416 Requested Range Not Satisfiable}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7233#section-4.4"&gt;HTTP/1.1: Range Requests, section 4.4&lt;/a&gt;
*/
REQUESTED_RANGE_NOT_SATISFIABLE(416, "Requested range not satisfiable"),
/**
* {@code 417 Expectation Failed}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.5.14"&gt;
* HTTP/1.1: Semantics and Content, section 6.5.14&lt;/a&gt;
*/
EXPECTATION_FAILED(417, "Expectation Failed"),
/**
* {@code 418 I'm a teapot}.
* @see &lt;a href="https://tools.ietf.org/html/rfc2324#section-2.3.2"&gt;HTCPCP/1.0&lt;/a&gt;
*/
I_AM_A_TEAPOT(418, "I'm a teapot"),
/**
* @deprecated See
* &lt;a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-webdav-protocol-06.txt"&gt;
* WebDAV Draft Changes&lt;/a&gt;
*/
@Deprecated
INSUFFICIENT_SPACE_ON_RESOURCE(419, "Insufficient Space On Resource"),
/**
* @deprecated See
* &lt;a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-webdav-protocol-06.txt"&gt;
* WebDAV Draft Changes&lt;/a&gt;
*/
@Deprecated
METHOD_FAILURE(420, "Method Failure"),
/**
* @deprecated
* See &lt;a href="https://tools.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-webdav-protocol-06.txt"&gt;
* WebDAV Draft Changes&lt;/a&gt;
*/
@Deprecated
DESTINATION_LOCKED(421, "Destination Locked"),
/**
* {@code 422 Unprocessable Entity}.
* @see &lt;a href="https://tools.ietf.org/html/rfc4918#section-11.2"&gt;WebDAV&lt;/a&gt;
*/
UNPROCESSABLE_ENTITY(422, "Unprocessable Entity"),
/**
* {@code 423 Locked}.
* @see &lt;a href="https://tools.ietf.org/html/rfc4918#section-11.3"&gt;WebDAV&lt;/a&gt;
*/
LOCKED(423, "Locked"),
/**
* {@code 424 Failed Dependency}.
* @see &lt;a href="https://tools.ietf.org/html/rfc4918#section-11.4"&gt;WebDAV&lt;/a&gt;
*/
FAILED_DEPENDENCY(424, "Failed Dependency"),
/**
* {@code 426 Upgrade Required}.
* @see &lt;a href="https://tools.ietf.org/html/rfc2817#section-6"&gt;Upgrading to TLS Within HTTP/1.1&lt;/a&gt;
*/
UPGRADE_REQUIRED(426, "Upgrade Required"),
/**
* {@code 428 Precondition Required}.
* @see &lt;a href="https://tools.ietf.org/html/rfc6585#section-3"&gt;Additional HTTP Status Codes&lt;/a&gt;
*/
PRECONDITION_REQUIRED(428, "Precondition Required"),
/**
* {@code 429 Too Many Requests}.
* @see &lt;a href="https://tools.ietf.org/html/rfc6585#section-4"&gt;Additional HTTP Status Codes&lt;/a&gt;
*/
TOO_MANY_REQUESTS(429, "Too Many Requests"),
/**
* {@code 431 Request Header Fields Too Large}.
* @see &lt;a href="https://tools.ietf.org/html/rfc6585#section-5"&gt;Additional HTTP Status Codes&lt;/a&gt;
*/
REQUEST_HEADER_FIELDS_TOO_LARGE(431, "Request Header Fields Too Large"),
/**
* {@code 451 Unavailable For Legal Reasons}.
* @see &lt;a href="https://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status-04"&gt;
* An HTTP Status Code to Report Legal Obstacles&lt;/a&gt;
* @since 4.3
*/
UNAVAILABLE_FOR_LEGAL_REASONS(451, "Unavailable For Legal Reasons"),
// --- 5xx Server Error ---
/**
* {@code 500 Internal Server Error}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.6.1"&gt;HTTP/1.1: Semantics and Content, section 6.6.1&lt;/a&gt;
*/
INTERNAL_SERVER_ERROR(500, "Internal Server Error"),
/**
* {@code 501 Not Implemented}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.6.2"&gt;HTTP/1.1: Semantics and Content, section 6.6.2&lt;/a&gt;
*/
NOT_IMPLEMENTED(501, "Not Implemented"),
/**
* {@code 502 Bad Gateway}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.6.3"&gt;HTTP/1.1: Semantics and Content, section 6.6.3&lt;/a&gt;
*/
BAD_GATEWAY(502, "Bad Gateway"),
/**
* {@code 503 Service Unavailable}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.6.4"&gt;HTTP/1.1: Semantics and Content, section 6.6.4&lt;/a&gt;
*/
SERVICE_UNAVAILABLE(503, "Service Unavailable"),
/**
* {@code 504 Gateway Timeout}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.6.5"&gt;HTTP/1.1: Semantics and Content, section 6.6.5&lt;/a&gt;
*/
GATEWAY_TIMEOUT(504, "Gateway Timeout"),
/**
* {@code 505 HTTP Version Not Supported}.
* @see &lt;a href="https://tools.ietf.org/html/rfc7231#section-6.6.6"&gt;HTTP/1.1: Semantics and Content, section 6.6.6&lt;/a&gt;
*/
HTTP_VERSION_NOT_SUPPORTED(505, "HTTP Version not supported"),
/**
* {@code 506 Variant Also Negotiates}
* @see &lt;a href="https://tools.ietf.org/html/rfc2295#section-8.1"&gt;Transparent Content Negotiation&lt;/a&gt;
*/
VARIANT_ALSO_NEGOTIATES(506, "Variant Also Negotiates"),
/**
* {@code 507 Insufficient Storage}
* @see &lt;a href="https://tools.ietf.org/html/rfc4918#section-11.5"&gt;WebDAV&lt;/a&gt;
*/
INSUFFICIENT_STORAGE(507, "Insufficient Storage"),
/**
* {@code 508 Loop Detected}
* @see &lt;a href="https://tools.ietf.org/html/rfc5842#section-7.2"&gt;WebDAV Binding Extensions&lt;/a&gt;
*/
LOOP_DETECTED(508, "Loop Detected"),
/**
* {@code 509 Bandwidth Limit Exceeded}
*/
BANDWIDTH_LIMIT_EXCEEDED(509, "Bandwidth Limit Exceeded"),
/**
* {@code 510 Not Extended}
* @see &lt;a href="https://tools.ietf.org/html/rfc2774#section-7"&gt;HTTP Extension Framework&lt;/a&gt;
*/
NOT_EXTENDED(510, "Not Extended"),
/**
* {@code 511 Network Authentication Required}.
* @see &lt;a href="https://tools.ietf.org/html/rfc6585#section-6"&gt;Additional HTTP Status Codes&lt;/a&gt;
*/
NETWORK_AUTHENTICATION_REQUIRED(511, "Network Authentication Required");
</code></pre>
<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http://markdownpad.com) -->
</body></html>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/xrkj-vue-cli-vant-starter.git
git@api.gitlife.ru:oschina-mirror/xrkj-vue-cli-vant-starter.git
oschina-mirror
xrkj-vue-cli-vant-starter
xrkj-vue-cli-vant-starter
master