{"id":211482,"date":"2014-02-05T11:10:03","date_gmt":"2014-02-05T07:10:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=211482"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=211482","title":{"rendered":"<span class=\"post_title\">\u041e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 WWW \u0432 Unity3D<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c6c\/e85\/8b5\/c6ce858b5b5d4e6ff026422355949b93.jpg\"\/><br \/>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0438\u043a\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 WWW \u0432 Unity3D.<\/p>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 WWW?<\/p>\n<p>  <b>WWW<\/b> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0435\u0431 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 URL \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0431\u0430\u043d\u0434\u043b\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 (<a href=\"http:\/\/docs.unity3d.com\/Documentation\/ScriptReference\/WWW.html\">\u043a\u043b\u0430\u0446<\/a>).<\/p>\n<p>  \u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h5>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438<\/h5>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0438\u0433\u0440\u0443 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 Php(\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0438 backend \u0447\u0430\u0441\u0442\u0438). \u0412\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0432\u0438\u0434\u0435 new WWW(Address + &quot;?api=login&#038;username=&#8230;&quot;); \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u043e\u0441\u044b\u043b\u043a\u043e\u0439\/\u043f\u0440\u0438\u0435\u043c\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0437\u0430\u0433\u0432\u043e\u0437\u0434\u043a\u0430: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0441\u043e\u0437\u0440\u0435\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 WWW.text.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h5>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043c\u0435\u0442\u043e\u0434 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432 enum, \u0438 \u0437\u0430\u0442\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u0434\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"cs\">public enum PacketTypes {     nil,     auth,     updateinfo } <\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430\/\u043e\u0442\u0432\u0435\u0442\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 <u>NetRequest<\/u> \u0438 <u>NetResponse<\/u> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041e\u043d\u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0445\u0440\u0430\u043d\u044f\u0442 \u0438\u0445 \u0432 Dictionary(\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e \u0436\u0435). NetRequest \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 <u>GetParamsString()<\/u>. NetResponse \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <u>IsError<\/u>.<\/p>\n<p>  \u0415\u0449\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0439 \u043a\u043b\u0430\u0441\u0441 HttpUtility(\u043d\u0435 \u0438\u0437 System.Web, \u0430\u0432\u0442\u043e\u0440 Patrik Torstensson), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044b(\u043f\u0440\u043e\u0431\u0435\u043b, \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0438 \u0434\u0440.). \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 System.Web \u0434\u043b\u044f Unity3d \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435\u0442. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">HttpUtility.cs<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">\/\/  \/\/ System.Web.HttpUtility \/\/ \/\/ Authors: \/\/   Patrik Torstensson (Patrik.Torstensson@labs2.com) \/\/   Wictor Wil\u00e9n (decode\/encode functions) (wictor@ibizkit.se) \/\/   Tim Coleman (tim@timcoleman.com) \/\/   Gonzalo Paniagua Javier (gonzalo@ximian.com) \/\/ \/\/ Copyright (C) 2005 Novell, Inc (http:\/\/www.novell.com) \/\/ \/\/ Permission is hereby granted, free of charge, to any person obtaining \/\/ a copy of this software and associated documentation files (the \/\/ &quot;Software&quot;), to deal in the Software without restriction, including \/\/ without limitation the rights to use, copy, modify, merge, publish, \/\/ distribute, sublicense, and\/or sell copies of the Software, and to \/\/ permit persons to whom the Software is furnished to do so, subject to \/\/ the following conditions: \/\/  \/\/ The above copyright notice and this permission notice shall be \/\/ included in all copies or substantial portions of the Software. \/\/  \/\/ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, \/\/ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \/\/ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \/\/ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE \/\/ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION \/\/ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION \/\/ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \/\/ using System.Collections; using System.Collections.Specialized; using System.Globalization; using System.IO; using System.Text; using System;  public sealed class HttpUtility {     #region Fields      static Hashtable entities;     static object lock_ = new object();      #endregion \/\/ Fields      static Hashtable Entities     {         get         {             lock (lock_)             {                 if (entities == null)                     InitEntities();                  return entities;             }         }     }      #region Constructors      static void InitEntities()     {         \/\/ Build the hash table of HTML entity references.  This list comes         \/\/ from the HTML 4.01 W3C recommendation.         entities = new Hashtable();         entities.Add(&quot;nbsp&quot;, '\\u00A0');         entities.Add(&quot;iexcl&quot;, '\\u00A1');         entities.Add(&quot;cent&quot;, '\\u00A2');         entities.Add(&quot;pound&quot;, '\\u00A3');         entities.Add(&quot;curren&quot;, '\\u00A4');         entities.Add(&quot;yen&quot;, '\\u00A5');         entities.Add(&quot;brvbar&quot;, '\\u00A6');         entities.Add(&quot;sect&quot;, '\\u00A7');         entities.Add(&quot;uml&quot;, '\\u00A8');         entities.Add(&quot;copy&quot;, '\\u00A9');         entities.Add(&quot;ordf&quot;, '\\u00AA');         entities.Add(&quot;laquo&quot;, '\\u00AB');         entities.Add(&quot;not&quot;, '\\u00AC');         entities.Add(&quot;shy&quot;, '\\u00AD');         entities.Add(&quot;reg&quot;, '\\u00AE');         entities.Add(&quot;macr&quot;, '\\u00AF');         entities.Add(&quot;deg&quot;, '\\u00B0');         entities.Add(&quot;plusmn&quot;, '\\u00B1');         entities.Add(&quot;sup2&quot;, '\\u00B2');         entities.Add(&quot;sup3&quot;, '\\u00B3');         entities.Add(&quot;acute&quot;, '\\u00B4');         entities.Add(&quot;micro&quot;, '\\u00B5');         entities.Add(&quot;para&quot;, '\\u00B6');         entities.Add(&quot;middot&quot;, '\\u00B7');         entities.Add(&quot;cedil&quot;, '\\u00B8');         entities.Add(&quot;sup1&quot;, '\\u00B9');         entities.Add(&quot;ordm&quot;, '\\u00BA');         entities.Add(&quot;raquo&quot;, '\\u00BB');         entities.Add(&quot;frac14&quot;, '\\u00BC');         entities.Add(&quot;frac12&quot;, '\\u00BD');         entities.Add(&quot;frac34&quot;, '\\u00BE');         entities.Add(&quot;iquest&quot;, '\\u00BF');         entities.Add(&quot;Agrave&quot;, '\\u00C0');         entities.Add(&quot;Aacute&quot;, '\\u00C1');         entities.Add(&quot;Acirc&quot;, '\\u00C2');         entities.Add(&quot;Atilde&quot;, '\\u00C3');         entities.Add(&quot;Auml&quot;, '\\u00C4');         entities.Add(&quot;Aring&quot;, '\\u00C5');         entities.Add(&quot;AElig&quot;, '\\u00C6');         entities.Add(&quot;Ccedil&quot;, '\\u00C7');         entities.Add(&quot;Egrave&quot;, '\\u00C8');         entities.Add(&quot;Eacute&quot;, '\\u00C9');         entities.Add(&quot;Ecirc&quot;, '\\u00CA');         entities.Add(&quot;Euml&quot;, '\\u00CB');         entities.Add(&quot;Igrave&quot;, '\\u00CC');         entities.Add(&quot;Iacute&quot;, '\\u00CD');         entities.Add(&quot;Icirc&quot;, '\\u00CE');         entities.Add(&quot;Iuml&quot;, '\\u00CF');         entities.Add(&quot;ETH&quot;, '\\u00D0');         entities.Add(&quot;Ntilde&quot;, '\\u00D1');         entities.Add(&quot;Ograve&quot;, '\\u00D2');         entities.Add(&quot;Oacute&quot;, '\\u00D3');         entities.Add(&quot;Ocirc&quot;, '\\u00D4');         entities.Add(&quot;Otilde&quot;, '\\u00D5');         entities.Add(&quot;Ouml&quot;, '\\u00D6');         entities.Add(&quot;times&quot;, '\\u00D7');         entities.Add(&quot;Oslash&quot;, '\\u00D8');         entities.Add(&quot;Ugrave&quot;, '\\u00D9');         entities.Add(&quot;Uacute&quot;, '\\u00DA');         entities.Add(&quot;Ucirc&quot;, '\\u00DB');         entities.Add(&quot;Uuml&quot;, '\\u00DC');         entities.Add(&quot;Yacute&quot;, '\\u00DD');         entities.Add(&quot;THORN&quot;, '\\u00DE');         entities.Add(&quot;szlig&quot;, '\\u00DF');         entities.Add(&quot;agrave&quot;, '\\u00E0');         entities.Add(&quot;aacute&quot;, '\\u00E1');         entities.Add(&quot;acirc&quot;, '\\u00E2');         entities.Add(&quot;atilde&quot;, '\\u00E3');         entities.Add(&quot;auml&quot;, '\\u00E4');         entities.Add(&quot;aring&quot;, '\\u00E5');         entities.Add(&quot;aelig&quot;, '\\u00E6');         entities.Add(&quot;ccedil&quot;, '\\u00E7');         entities.Add(&quot;egrave&quot;, '\\u00E8');         entities.Add(&quot;eacute&quot;, '\\u00E9');         entities.Add(&quot;ecirc&quot;, '\\u00EA');         entities.Add(&quot;euml&quot;, '\\u00EB');         entities.Add(&quot;igrave&quot;, '\\u00EC');         entities.Add(&quot;iacute&quot;, '\\u00ED');         entities.Add(&quot;icirc&quot;, '\\u00EE');         entities.Add(&quot;iuml&quot;, '\\u00EF');         entities.Add(&quot;eth&quot;, '\\u00F0');         entities.Add(&quot;ntilde&quot;, '\\u00F1');         entities.Add(&quot;ograve&quot;, '\\u00F2');         entities.Add(&quot;oacute&quot;, '\\u00F3');         entities.Add(&quot;ocirc&quot;, '\\u00F4');         entities.Add(&quot;otilde&quot;, '\\u00F5');         entities.Add(&quot;ouml&quot;, '\\u00F6');         entities.Add(&quot;divide&quot;, '\\u00F7');         entities.Add(&quot;oslash&quot;, '\\u00F8');         entities.Add(&quot;ugrave&quot;, '\\u00F9');         entities.Add(&quot;uacute&quot;, '\\u00FA');         entities.Add(&quot;ucirc&quot;, '\\u00FB');         entities.Add(&quot;uuml&quot;, '\\u00FC');         entities.Add(&quot;yacute&quot;, '\\u00FD');         entities.Add(&quot;thorn&quot;, '\\u00FE');         entities.Add(&quot;yuml&quot;, '\\u00FF');         entities.Add(&quot;fnof&quot;, '\\u0192');         entities.Add(&quot;Alpha&quot;, '\\u0391');         entities.Add(&quot;Beta&quot;, '\\u0392');         entities.Add(&quot;Gamma&quot;, '\\u0393');         entities.Add(&quot;Delta&quot;, '\\u0394');         entities.Add(&quot;Epsilon&quot;, '\\u0395');         entities.Add(&quot;Zeta&quot;, '\\u0396');         entities.Add(&quot;Eta&quot;, '\\u0397');         entities.Add(&quot;Theta&quot;, '\\u0398');         entities.Add(&quot;Iota&quot;, '\\u0399');         entities.Add(&quot;Kappa&quot;, '\\u039A');         entities.Add(&quot;Lambda&quot;, '\\u039B');         entities.Add(&quot;Mu&quot;, '\\u039C');         entities.Add(&quot;Nu&quot;, '\\u039D');         entities.Add(&quot;Xi&quot;, '\\u039E');         entities.Add(&quot;Omicron&quot;, '\\u039F');         entities.Add(&quot;Pi&quot;, '\\u03A0');         entities.Add(&quot;Rho&quot;, '\\u03A1');         entities.Add(&quot;Sigma&quot;, '\\u03A3');         entities.Add(&quot;Tau&quot;, '\\u03A4');         entities.Add(&quot;Upsilon&quot;, '\\u03A5');         entities.Add(&quot;Phi&quot;, '\\u03A6');         entities.Add(&quot;Chi&quot;, '\\u03A7');         entities.Add(&quot;Psi&quot;, '\\u03A8');         entities.Add(&quot;Omega&quot;, '\\u03A9');         entities.Add(&quot;alpha&quot;, '\\u03B1');         entities.Add(&quot;beta&quot;, '\\u03B2');         entities.Add(&quot;gamma&quot;, '\\u03B3');         entities.Add(&quot;delta&quot;, '\\u03B4');         entities.Add(&quot;epsilon&quot;, '\\u03B5');         entities.Add(&quot;zeta&quot;, '\\u03B6');         entities.Add(&quot;eta&quot;, '\\u03B7');         entities.Add(&quot;theta&quot;, '\\u03B8');         entities.Add(&quot;iota&quot;, '\\u03B9');         entities.Add(&quot;kappa&quot;, '\\u03BA');         entities.Add(&quot;lambda&quot;, '\\u03BB');         entities.Add(&quot;mu&quot;, '\\u03BC');         entities.Add(&quot;nu&quot;, '\\u03BD');         entities.Add(&quot;xi&quot;, '\\u03BE');         entities.Add(&quot;omicron&quot;, '\\u03BF');         entities.Add(&quot;pi&quot;, '\\u03C0');         entities.Add(&quot;rho&quot;, '\\u03C1');         entities.Add(&quot;sigmaf&quot;, '\\u03C2');         entities.Add(&quot;sigma&quot;, '\\u03C3');         entities.Add(&quot;tau&quot;, '\\u03C4');         entities.Add(&quot;upsilon&quot;, '\\u03C5');         entities.Add(&quot;phi&quot;, '\\u03C6');         entities.Add(&quot;chi&quot;, '\\u03C7');         entities.Add(&quot;psi&quot;, '\\u03C8');         entities.Add(&quot;omega&quot;, '\\u03C9');         entities.Add(&quot;thetasym&quot;, '\\u03D1');         entities.Add(&quot;upsih&quot;, '\\u03D2');         entities.Add(&quot;piv&quot;, '\\u03D6');         entities.Add(&quot;bull&quot;, '\\u2022');         entities.Add(&quot;hellip&quot;, '\\u2026');         entities.Add(&quot;prime&quot;, '\\u2032');         entities.Add(&quot;Prime&quot;, '\\u2033');         entities.Add(&quot;oline&quot;, '\\u203E');         entities.Add(&quot;frasl&quot;, '\\u2044');         entities.Add(&quot;weierp&quot;, '\\u2118');         entities.Add(&quot;image&quot;, '\\u2111');         entities.Add(&quot;real&quot;, '\\u211C');         entities.Add(&quot;trade&quot;, '\\u2122');         entities.Add(&quot;alefsym&quot;, '\\u2135');         entities.Add(&quot;larr&quot;, '\\u2190');         entities.Add(&quot;uarr&quot;, '\\u2191');         entities.Add(&quot;rarr&quot;, '\\u2192');         entities.Add(&quot;darr&quot;, '\\u2193');         entities.Add(&quot;harr&quot;, '\\u2194');         entities.Add(&quot;crarr&quot;, '\\u21B5');         entities.Add(&quot;lArr&quot;, '\\u21D0');         entities.Add(&quot;uArr&quot;, '\\u21D1');         entities.Add(&quot;rArr&quot;, '\\u21D2');         entities.Add(&quot;dArr&quot;, '\\u21D3');         entities.Add(&quot;hArr&quot;, '\\u21D4');         entities.Add(&quot;forall&quot;, '\\u2200');         entities.Add(&quot;part&quot;, '\\u2202');         entities.Add(&quot;exist&quot;, '\\u2203');         entities.Add(&quot;empty&quot;, '\\u2205');         entities.Add(&quot;nabla&quot;, '\\u2207');         entities.Add(&quot;isin&quot;, '\\u2208');         entities.Add(&quot;notin&quot;, '\\u2209');         entities.Add(&quot;ni&quot;, '\\u220B');         entities.Add(&quot;prod&quot;, '\\u220F');         entities.Add(&quot;sum&quot;, '\\u2211');         entities.Add(&quot;minus&quot;, '\\u2212');         entities.Add(&quot;lowast&quot;, '\\u2217');         entities.Add(&quot;radic&quot;, '\\u221A');         entities.Add(&quot;prop&quot;, '\\u221D');         entities.Add(&quot;infin&quot;, '\\u221E');         entities.Add(&quot;ang&quot;, '\\u2220');         entities.Add(&quot;and&quot;, '\\u2227');         entities.Add(&quot;or&quot;, '\\u2228');         entities.Add(&quot;cap&quot;, '\\u2229');         entities.Add(&quot;cup&quot;, '\\u222A');         entities.Add(&quot;int&quot;, '\\u222B');         entities.Add(&quot;there4&quot;, '\\u2234');         entities.Add(&quot;sim&quot;, '\\u223C');         entities.Add(&quot;cong&quot;, '\\u2245');         entities.Add(&quot;asymp&quot;, '\\u2248');         entities.Add(&quot;ne&quot;, '\\u2260');         entities.Add(&quot;equiv&quot;, '\\u2261');         entities.Add(&quot;le&quot;, '\\u2264');         entities.Add(&quot;ge&quot;, '\\u2265');         entities.Add(&quot;sub&quot;, '\\u2282');         entities.Add(&quot;sup&quot;, '\\u2283');         entities.Add(&quot;nsub&quot;, '\\u2284');         entities.Add(&quot;sube&quot;, '\\u2286');         entities.Add(&quot;supe&quot;, '\\u2287');         entities.Add(&quot;oplus&quot;, '\\u2295');         entities.Add(&quot;otimes&quot;, '\\u2297');         entities.Add(&quot;perp&quot;, '\\u22A5');         entities.Add(&quot;sdot&quot;, '\\u22C5');         entities.Add(&quot;lceil&quot;, '\\u2308');         entities.Add(&quot;rceil&quot;, '\\u2309');         entities.Add(&quot;lfloor&quot;, '\\u230A');         entities.Add(&quot;rfloor&quot;, '\\u230B');         entities.Add(&quot;lang&quot;, '\\u2329');         entities.Add(&quot;rang&quot;, '\\u232A');         entities.Add(&quot;loz&quot;, '\\u25CA');         entities.Add(&quot;spades&quot;, '\\u2660');         entities.Add(&quot;clubs&quot;, '\\u2663');         entities.Add(&quot;hearts&quot;, '\\u2665');         entities.Add(&quot;diams&quot;, '\\u2666');         entities.Add(&quot;quot&quot;, '\\u0022');         entities.Add(&quot;amp&quot;, '\\u0026');         entities.Add(&quot;lt&quot;, '\\u003C');         entities.Add(&quot;gt&quot;, '\\u003E');         entities.Add(&quot;OElig&quot;, '\\u0152');         entities.Add(&quot;oelig&quot;, '\\u0153');         entities.Add(&quot;Scaron&quot;, '\\u0160');         entities.Add(&quot;scaron&quot;, '\\u0161');         entities.Add(&quot;Yuml&quot;, '\\u0178');         entities.Add(&quot;circ&quot;, '\\u02C6');         entities.Add(&quot;tilde&quot;, '\\u02DC');         entities.Add(&quot;ensp&quot;, '\\u2002');         entities.Add(&quot;emsp&quot;, '\\u2003');         entities.Add(&quot;thinsp&quot;, '\\u2009');         entities.Add(&quot;zwnj&quot;, '\\u200C');         entities.Add(&quot;zwj&quot;, '\\u200D');         entities.Add(&quot;lrm&quot;, '\\u200E');         entities.Add(&quot;rlm&quot;, '\\u200F');         entities.Add(&quot;ndash&quot;, '\\u2013');         entities.Add(&quot;mdash&quot;, '\\u2014');         entities.Add(&quot;lsquo&quot;, '\\u2018');         entities.Add(&quot;rsquo&quot;, '\\u2019');         entities.Add(&quot;sbquo&quot;, '\\u201A');         entities.Add(&quot;ldquo&quot;, '\\u201C');         entities.Add(&quot;rdquo&quot;, '\\u201D');         entities.Add(&quot;bdquo&quot;, '\\u201E');         entities.Add(&quot;dagger&quot;, '\\u2020');         entities.Add(&quot;Dagger&quot;, '\\u2021');         entities.Add(&quot;permil&quot;, '\\u2030');         entities.Add(&quot;lsaquo&quot;, '\\u2039');         entities.Add(&quot;rsaquo&quot;, '\\u203A');         entities.Add(&quot;euro&quot;, '\\u20AC');     }      public HttpUtility()     {     }      #endregion \/\/ Constructors      #region Methods      public static void HtmlAttributeEncode(string s, TextWriter output)     {         output.Write(HtmlAttributeEncode(s));     }      public static string HtmlAttributeEncode(string s)     {         if (null == s)             return null;          if (s.IndexOf('&') == -1 && s.IndexOf('&quot;') == -1)             return s;          StringBuilder output = new StringBuilder();         foreach (char c in s)             switch (c)             {                 case '&':                     output.Append(&quot;&amp;&quot;);                     break;                 case '&quot;':                     output.Append(&quot;&quot;&quot;);                     break;                 default:                     output.Append(c);                     break;             }          return output.ToString();     }      public static string UrlDecode(string str)     {         return UrlDecode(str, Encoding.UTF8);     }      private static char[] GetChars(MemoryStream b, Encoding e)     {         return e.GetChars(b.GetBuffer(), 0, (int)b.Length);     }      public static string UrlDecode(string s, Encoding e)     {         if (null == s)             return null;          if (s.IndexOf('%') == -1 && s.IndexOf('+') == -1)             return s;          if (e == null)             e = Encoding.UTF8;          StringBuilder output = new StringBuilder();         long len = s.Length;         MemoryStream bytes = new MemoryStream();         int xchar;          for (int i = 0; i &lt; len; i++)         {             if (s[i] == '%' && i + 2 &lt; len && s[i + 1] != '%')             {                 if (s[i + 1] == 'u' && i + 5 &lt; len)                 {                     if (bytes.Length &gt; 0)                     {                         output.Append(GetChars(bytes, e));                         bytes.SetLength(0);                     }                      xchar = GetChar(s, i + 2, 4);                     if (xchar != -1)                     {                         output.Append((char)xchar);                         i += 5;                     }                     else                     {                         output.Append('%');                     }                 }                 else if ((xchar = GetChar(s, i + 1, 2)) != -1)                 {                     bytes.WriteByte((byte)xchar);                     i += 2;                 }                 else                 {                     output.Append('%');                 }                 continue;             }              if (bytes.Length &gt; 0)             {                 output.Append(GetChars(bytes, e));                 bytes.SetLength(0);             }              if (s[i] == '+')             {                 output.Append(' ');             }             else             {                 output.Append(s[i]);             }         }          if (bytes.Length &gt; 0)         {             output.Append(GetChars(bytes, e));         }          bytes = null;         return output.ToString();     }      public static string UrlDecode(byte[] bytes, Encoding e)     {         if (bytes == null)             return null;          return UrlDecode(bytes, 0, bytes.Length, e);     }      private static int GetInt(byte b)     {         char c = (char)b;         if (c &gt;= '0' && c &lt;= '9')             return c - '0';          if (c &gt;= 'a' && c &lt;= 'f')             return c - 'a' + 10;          if (c &gt;= 'A' && c &lt;= 'F')             return c - 'A' + 10;          return -1;     }      private static int GetChar(byte[] bytes, int offset, int length)     {         int value = 0;         int end = length + offset;         for (int i = offset; i &lt; end; i++)         {             int current = GetInt(bytes[i]);             if (current == -1)                 return -1;             value = (value &lt;&lt; 4) + current;         }          return value;     }      private static int GetChar(string str, int offset, int length)     {         int val = 0;         int end = length + offset;         for (int i = offset; i &lt; end; i++)         {             char c = str[i];             if (c &gt; 127)                 return -1;              int current = GetInt((byte)c);             if (current == -1)                 return -1;             val = (val &lt;&lt; 4) + current;         }          return val;     }      public static string UrlDecode(byte[] bytes, int offset, int count, Encoding e)     {         if (bytes == null)             return null;         if (count == 0)             return String.Empty;          if (bytes == null)             throw new ArgumentNullException(&quot;bytes&quot;);          if (offset &lt; 0 || offset &gt; bytes.Length)             throw new ArgumentOutOfRangeException(&quot;offset&quot;);          if (count &lt; 0 || offset + count &gt; bytes.Length)             throw new ArgumentOutOfRangeException(&quot;count&quot;);          StringBuilder output = new StringBuilder();         MemoryStream acc = new MemoryStream();          int end = count + offset;         int xchar;         for (int i = offset; i &lt; end; i++)         {             if (bytes[i] == '%' && i + 2 &lt; count && bytes[i + 1] != '%')             {                 if (bytes[i + 1] == (byte)'u' && i + 5 &lt; end)                 {                     if (acc.Length &gt; 0)                     {                         output.Append(GetChars(acc, e));                         acc.SetLength(0);                     }                     xchar = GetChar(bytes, i + 2, 4);                     if (xchar != -1)                     {                         output.Append((char)xchar);                         i += 5;                         continue;                     }                 }                 else if ((xchar = GetChar(bytes, i + 1, 2)) != -1)                 {                     acc.WriteByte((byte)xchar);                     i += 2;                     continue;                 }             }              if (acc.Length &gt; 0)             {                 output.Append(GetChars(acc, e));                 acc.SetLength(0);             }              if (bytes[i] == '+')             {                 output.Append(' ');             }             else             {                 output.Append((char)bytes[i]);             }         }          if (acc.Length &gt; 0)         {             output.Append(GetChars(acc, e));         }          acc = null;         return output.ToString();     }      public static byte[] UrlDecodeToBytes(byte[] bytes)     {         if (bytes == null)             return null;          return UrlDecodeToBytes(bytes, 0, bytes.Length);     }      public static byte[] UrlDecodeToBytes(string str)     {         return UrlDecodeToBytes(str, Encoding.UTF8);     }      public static byte[] UrlDecodeToBytes(string str, Encoding e)     {         if (str == null)             return null;          if (e == null)             throw new ArgumentNullException(&quot;e&quot;);          return UrlDecodeToBytes(e.GetBytes(str));     }      public static byte[] UrlDecodeToBytes(byte[] bytes, int offset, int count)     {         if (bytes == null)             return null;         if (count == 0)             return new byte[0];          int len = bytes.Length;         if (offset &lt; 0 || offset &gt;= len)             throw new ArgumentOutOfRangeException(&quot;offset&quot;);          if (count &lt; 0 || offset &gt; len - count)             throw new ArgumentOutOfRangeException(&quot;count&quot;);          MemoryStream result = new MemoryStream();         int end = offset + count;         for (int i = offset; i &lt; end; i++)         {             char c = (char)bytes[i];             if (c == '+')             {                 c = ' ';             }             else if (c == '%' && i &lt; end - 2)             {                 int xchar = GetChar(bytes, i + 1, 2);                 if (xchar != -1)                 {                     c = (char)xchar;                     i += 2;                 }             }             result.WriteByte((byte)c);         }          return result.ToArray();     }      static char[] hexChars = &quot;0123456789abcdef&quot;.ToCharArray();     const string notEncoded = &quot;!'()*-._&quot;;      static void UrlEncodeChar(char c, Stream result, bool isUnicode)     {         if (c &gt; 255)         {             \/\/FIXME: what happens when there is an internal error?             \/\/if (!isUnicode)             \/\/      throw new ArgumentOutOfRangeException (&quot;c&quot;, c, &quot;c must be less than 256&quot;);             int idx;             int i = (int)c;              result.WriteByte((byte)'%');             result.WriteByte((byte)'u');             idx = i &gt;&gt; 12;             result.WriteByte((byte)hexChars[idx]);             idx = (i &gt;&gt; 8) & 0x0F;             result.WriteByte((byte)hexChars[idx]);             idx = (i &gt;&gt; 4) & 0x0F;             result.WriteByte((byte)hexChars[idx]);             idx = i & 0x0F;             result.WriteByte((byte)hexChars[idx]);             return;         }          if (c &gt; ' ' && notEncoded.IndexOf(c) != -1)         {             result.WriteByte((byte)c);             return;         }         if (c == ' ')         {             result.WriteByte((byte)'+');             return;         }         if ((c &lt; '0') ||                 (c &lt; 'A' && c &gt; '9') ||                 (c &gt; 'Z' && c &lt; 'a') ||                 (c &gt; 'z'))         {             if (isUnicode && c &gt; 127)             {                 result.WriteByte((byte)'%');                 result.WriteByte((byte)'u');                 result.WriteByte((byte)'0');                 result.WriteByte((byte)'0');             }             else                 result.WriteByte((byte)'%');              int idx = ((int)c) &gt;&gt; 4;             result.WriteByte((byte)hexChars[idx]);             idx = ((int)c) & 0x0F;             result.WriteByte((byte)hexChars[idx]);         }         else             result.WriteByte((byte)c);     }      public static byte[] UrlEncodeToBytes(byte[] bytes, int offset, int count)     {         if (bytes == null)             return null;          int len = bytes.Length;         if (len == 0)             return new byte[0];          if (offset &lt; 0 || offset &gt;= len)             throw new ArgumentOutOfRangeException(&quot;offset&quot;);          if (count &lt; 0 || count &gt; len - offset)             throw new ArgumentOutOfRangeException(&quot;count&quot;);          MemoryStream result = new MemoryStream(count);         int end = offset + count;         for (int i = offset; i &lt; end; i++)             UrlEncodeChar((char)bytes[i], result, false);          return result.ToArray();     }       public static byte[] UrlEncodeUnicodeToBytes(string str)     {         if (str == null)             return null;          if (str == &quot;&quot;)             return new byte[0];          MemoryStream result = new MemoryStream(str.Length);         foreach (char c in str)         {             UrlEncodeChar(c, result, true);         }         return result.ToArray();     }      \/\/\/ &lt;summary&gt;     \/\/\/ Decodes an HTML-encoded string and returns the decoded string.     \/\/\/ &lt;\/summary&gt;     \/\/\/ &lt;param name=&quot;s&quot;&gt;The HTML string to decode. &lt;\/param&gt;     \/\/\/ &lt;returns&gt;The decoded text.&lt;\/returns&gt;     public static string HtmlDecode(string s)     {         if (s == null)             throw new ArgumentNullException(&quot;s&quot;);          if (s.IndexOf('&') == -1)             return s;          StringBuilder entity = new StringBuilder();         StringBuilder output = new StringBuilder();         int len = s.Length;         \/\/ 0 -&gt; nothing,         \/\/ 1 -&gt; right after '&'         \/\/ 2 -&gt; between '&' and ';' but no '#'         \/\/ 3 -&gt; '#' found after '&' and getting numbers         int state = 0;         int number = 0;         bool have_trailing_digits = false;          for (int i = 0; i &lt; len; i++)         {             char c = s[i];             if (state == 0)             {                 if (c == '&')                 {                     entity.Append(c);                     state = 1;                 }                 else                 {                     output.Append(c);                 }                 continue;             }              if (c == '&')             {                 state = 1;                 if (have_trailing_digits)                 {                     entity.Append(number.ToString(CultureInfo.InvariantCulture));                     have_trailing_digits = false;                 }                  output.Append(entity.ToString());                 entity.Length = 0;                 entity.Append('&');                 continue;             }              if (state == 1)             {                 if (c == ';')                 {                     state = 0;                     output.Append(entity.ToString());                     output.Append(c);                     entity.Length = 0;                 }                 else                 {                     number = 0;                     if (c != '#')                     {                         state = 2;                     }                     else                     {                         state = 3;                     }                     entity.Append(c);                 }             }             else if (state == 2)             {                 entity.Append(c);                 if (c == ';')                 {                     string key = entity.ToString();                     if (key.Length &gt; 1 && Entities.ContainsKey(key.Substring(1, key.Length - 2)))                         key = Entities[key.Substring(1, key.Length - 2)].ToString();                      output.Append(key);                     state = 0;                     entity.Length = 0;                 }             }             else if (state == 3)             {                 if (c == ';')                 {                     if (number &gt; 65535)                     {                         output.Append(&quot;&#&quot;);                         output.Append(number.ToString(CultureInfo.InvariantCulture));                         output.Append(&quot;;&quot;);                     }                     else                     {                         output.Append((char)number);                     }                     state = 0;                     entity.Length = 0;                     have_trailing_digits = false;                 }                 else if (Char.IsDigit(c))                 {                     number = number * 10 + ((int)c - '0');                     have_trailing_digits = true;                 }                 else                 {                     state = 2;                     if (have_trailing_digits)                     {                         entity.Append(number.ToString(CultureInfo.InvariantCulture));                         have_trailing_digits = false;                     }                     entity.Append(c);                 }             }         }          if (entity.Length &gt; 0)         {             output.Append(entity.ToString());         }         else if (have_trailing_digits)         {             output.Append(number.ToString(CultureInfo.InvariantCulture));         }         return output.ToString();     }      \/\/\/ &lt;summary&gt;     \/\/\/ Decodes an HTML-encoded string and sends the resulting output to a TextWriter output stream.     \/\/\/ &lt;\/summary&gt;     \/\/\/ &lt;param name=&quot;s&quot;&gt;The HTML string to decode&lt;\/param&gt;     \/\/\/ &lt;param name=&quot;output&quot;&gt;The TextWriter output stream containing the decoded string. &lt;\/param&gt;     public static void HtmlDecode(string s, TextWriter output)     {         if (s != null)             output.Write(HtmlDecode(s));     }      \/\/\/ &lt;summary&gt;     \/\/\/ HTML-encodes a string and returns the encoded string.     \/\/\/ &lt;\/summary&gt;     \/\/\/ &lt;param name=&quot;s&quot;&gt;The text string to encode. &lt;\/param&gt;     \/\/\/ &lt;returns&gt;The HTML-encoded text.&lt;\/returns&gt;     public static string HtmlEncode(string s)     {         if (s == null)             return null;          StringBuilder output = new StringBuilder();          foreach (char c in s)             switch (c)             {                 case '&':                     output.Append(&quot;&amp;&quot;);                     break;                 case '&gt;':                     output.Append(&quot;&gt;&quot;);                     break;                 case '&lt;':                     output.Append(&quot;&lt;&quot;);                     break;                 case '&quot;':                     output.Append(&quot;&quot;&quot;);                     break;                 default:                     \/\/ MS starts encoding with &# from 160 and stops at 255.                     \/\/ We don't do that. One reason is the 65308\/65310 unicode                     \/\/ characters that look like '&lt;' and '&gt;'.                     if (c &gt; 159)                     {                         output.Append(&quot;&#&quot;);                         output.Append(((int)c).ToString(CultureInfo.InvariantCulture));                         output.Append(&quot;;&quot;);                     }                     else                     {                         output.Append(c);                     }                     break;             }         return output.ToString();     }      \/\/\/ &lt;summary&gt;     \/\/\/ HTML-encodes a string and sends the resulting output to a TextWriter output stream.     \/\/\/ &lt;\/summary&gt;     \/\/\/ &lt;param name=&quot;s&quot;&gt;The string to encode. &lt;\/param&gt;     \/\/\/ &lt;param name=&quot;output&quot;&gt;The TextWriter output stream containing the encoded string. &lt;\/param&gt;     public static void HtmlEncode(string s, TextWriter output)     {         if (s != null)             output.Write(HtmlEncode(s));     }  #if NET_1_1                 public static string UrlPathEncode (string s)                 {                         if (s == null || s.Length == 0)                                 return s;                          MemoryStream result = new MemoryStream ();                         int length = s.Length;             for (int i = 0; i &lt; length; i++) {                                 UrlPathEncodeChar (s [i], result);                         }                         return Encoding.ASCII.GetString (result.ToArray ());                 }                                  static void UrlPathEncodeChar (char c, Stream result) {                         if (c &gt; 127) {                                 byte [] bIn = Encoding.UTF8.GetBytes (c.ToString ());                                 for (int i = 0; i &lt; bIn.Length; i++) {                                         result.WriteByte ((byte) '%');                                         int idx = ((int) bIn [i]) &gt;&gt; 4;                                         result.WriteByte ((byte) hexChars [idx]);                                         idx = ((int) bIn [i]) & 0x0F;                                         result.WriteByte ((byte) hexChars [idx]);                                 }                         }                         else if (c == ' ') {                                 result.WriteByte ((byte) '%');                                 result.WriteByte ((byte) '2');                                 result.WriteByte ((byte) '0');                         }                         else                                 result.WriteByte ((byte) c);                 } #endif  #if NET_2_0                 public static NameValueCollection ParseQueryString (string query)                 {                         return ParseQueryString (query, Encoding.UTF8);                 }                  public static NameValueCollection ParseQueryString (string query, Encoding encoding)                 {                         if (query == null)                                 throw new ArgumentNullException (&quot;query&quot;);                         if (encoding == null)                                 throw new ArgumentNullException (&quot;encoding&quot;);                         if (query.Length == 0 || (query.Length == 1 && query[0] == '?'))                                 return new NameValueCollection ();                         if (query[0] == '?')                                 query = query.Substring (1);                                                          NameValueCollection result = new NameValueCollection ();                         ParseQueryString (query, encoding, result);                         return result;                 }                                #endif      internal static void ParseQueryString(string query, Encoding encoding, NameValueCollection result)     {         if (query.Length == 0)             return;          int namePos = 0;         while (namePos &lt;= query.Length)         {             int valuePos = -1, valueEnd = -1;             for (int q = namePos; q &lt; query.Length; q++)             {                 if (valuePos == -1 && query[q] == '=')                 {                     valuePos = q + 1;                 }                 else if (query[q] == '&')                 {                     valueEnd = q;                     break;                 }             }              string name, value;             if (valuePos == -1)             {                 name = null;                 valuePos = namePos;             }             else             {                 name = UrlDecode(query.Substring(namePos, valuePos - namePos - 1), encoding);             }             if (valueEnd &lt; 0)             {                 namePos = -1;                 valueEnd = query.Length;             }             else             {                 namePos = valueEnd + 1;             }             value = UrlDecode(query.Substring(valuePos, valueEnd - valuePos), encoding);              result.Add(name, value);             if (namePos == -1) break;         }     }     #endregion \/\/ Methods } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  NetRequest.cs  <\/p>\n<pre><code class=\"cs\">using System.Collections.Generic; using System.Linq;  public class NetRequest : Dictionary&lt;string, string&gt; {     private const string METHOD_KEY = &quot;method&quot;;      public NetRequest(PacketTypes header)     {         AddParam(METHOD_KEY, header.ToString());     }      public void AddParam(string key, string value)     {         var val = HttpUtility.HtmlEncode(value);          if (ContainsKey(key))             base[key] = val;         else             Add(key, val);     }      public void AddParam(string key, long value)     {         AddParam(key, value.ToString());     }      public void AddParam(string key, bool value)     {         AddParam(key, value ? 1 : 0);     }      public void RemoveParam(string key)     {         if (ContainsKey(key))             Remove(key);     }      public string GetParamsString()     {         return string.Join(&quot;&&quot;, this.Select(n =&gt; n.Key + &quot;=&quot; + n.Value).ToArray());     } } <\/code><\/pre>\n<p>  NetResponse.cs  <\/p>\n<pre><code class=\"cs\">using System.Collections.Generic;  public class NetResponse : Dictionary&lt;string, string&gt; {     private const string ERROR_KEY = &quot;error&quot;;      public string GetError     {         get         {             if (IsError)                 return base[ERROR_KEY];              return string.Empty;         }     }      public bool IsError     {         get { return ContainsKey(ERROR_KEY); }     }      public NetResponse(string data)     {         var mas = data.Split(new[] { '&' });          foreach (var s in mas)         {             var keyVal = s.Split(new[] { '=' });             Add(keyVal[0], HttpUtility.UrlDecode(keyVal[1]));         }     } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0415\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 Network(\u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430(\u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438).<\/p>\n<p>  Network.cs  <\/p>\n<pre><code class=\"cs\">using System.Collections; using UnityEngine;  public class Network {     private static Network _instance;     public static Network Instance     {         get         {             if (_instance == null)                 _instance = new Network();             return _instance;         }     }      private const string SERVER_PATH = &quot;http:\/\/localhost:8080\/server\/engine.php&quot;;      private IEnumerator SendRequest(NetRequest request)     {         var www = new WWW(string.Concat(SERVER_PATH, &quot;?&quot;, request.GetParamsString()));         while (!www.isDone)             yield return www;          if (!string.IsNullOrEmpty(www.error))         {             \/\/Logger.Log(&quot;[Network] SendRequest ERROR:&quot; + www.error);             yield return new NetResponse(&quot;error=&quot; + www.error);             yield break;         }          \/\/Logger.Log(&quot;[Network] input data:{0}&quot;, www.text);         yield return new NetResponse(www.text);     }      \/\/\/ &lt;summary&gt;     \/\/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435     \/\/\/ &lt;\/summary&gt;     public IEnumerator SendUpdateInfo(int points)     {         var request = new NetRequest(PacketTypes.updateinfo);         request.AddParam(&quot;points&quot;, points);          return SendRequest(request).ContinueWith(response =&gt;         {             if (response.IsError)             {                 \/\/Logger.Log(&quot;SendUpdateInfoError:&quot;, response.GetError);             }             else             {                 \/\/OK             }         });      } } <\/code><\/pre>\n<p>  \u0422\u0443\u0442, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0434\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u0435\u0442\u043e\u0434 <b>SendRequest<\/b> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 IEnumerator, \u0442.\u043a. \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u00ab\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u00bb. \u041c\u044b \u0436\u0434\u0435\u043c \u043f\u043e\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 NetResponse \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0435\u0441\u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 WWW \u0438\u043b\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u043e \u043c\u044b \u0443\u0434\u0430\u0447\u043d\u043e \u0441\u0443\u0435\u043c \u0435\u0435 \u0432 NetResponse \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0448\u0435\u043b\u0435\u0436\u0430\u0449\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0442\u043e \u043c\u044b, \u0434\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435(hash \u043e\u0442 \u0432\u0441\u0435\u0439 \u043d\u0430\u0447\u0438\u043d\u043a\u0438, ID \u044e\u0437\u0435\u0440\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435) \u043f\u0440\u044f\u043c\u043e \u0432 SendRequest.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 IEnumerator SendUpdateInfo(int points). \u0417\u0430\u0447\u0435\u043c IEnumerator? \u042d\u0442\u043e, \u0431\u0440\u0430\u0442\u0446\u044b, \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f StartCoroutine. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b. \u041d\u043e \u0433\u0434\u0435 \u043f\u0440\u043e\u0444\u0438\u0442?<\/p>\n<p>  \u041e\u043d \u043d\u0438\u0436\u0435<\/p>\n<pre><code class=\"cs\">return SendRequest(request).ContinueWith(response =&gt;         {             if (response.IsError)             {                 \/\/Logger.Log(&quot;SendUpdateInfoError:&quot;, response.GetError);             }             else             {                 \/\/OK             }         }); <\/code><\/pre>\n<p>  \u0422.\u043a. \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c NetResponse \u0438\u0437 SendRequest, \u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u0443\u0436\u0435 \u043a \u0434\u0430\u043d\u043d\u044b\u043c, \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <b>.ContinueWith<\/b>:<\/p>\n<pre><code class=\"cs\">public static class NetApiExt {     public static IEnumerator ContinueWith(this IEnumerator request, Action&lt;NetResponse&gt; resp)     {         var link = request;         while (link.MoveNext())         {             yield return link;         }          resp(link.Current as NetResponse);     } } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0445\u0430\u043a:)<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0442 \u043b\u043e\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u0442\u0430\u043a \u0438 \u0441\u043d\u0430\u0440\u0443\u0436\u0438:<\/p>\n<pre><code class=\"cs\">        StartCoroutine(Network.Instance.SendUpdateInfo(userPoints).ContinueWith(reponse =&gt;         {             if (!reponse.IsError)             {                 \/\/var newPoints = int.Parse(reponse[&quot;points&quot;]);             }         })); <\/code><\/pre>\n<p>  \u0421\u0435\u0440\u0432\u0435\u0440\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 $_GET[\u00absome key\u00bb], \u0434\u0430\u043b\u0435\u0435 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0438 \u043d\u0443\u0436\u043d\u043e\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 NetResponse:<\/p>\n<pre><code class=\"php\">class NetResponse { \tprivate $mas = array(); \t \tpublic function AddParam($key, $val){             $this-&gt;mas[$key] = urlencode($val); \t} \t         public function AddError($val){             $this-&gt;AddParam(&quot;error&quot;, $val);         }  \tpublic function SendResponse(){ \t\t$res = &quot;&quot;; \t\tforeach ($this-&gt;mas as $key =&gt; $val) { \t\t\t$res = $res.strtolower($key).&quot;=&quot;.$val.&quot;&&quot;; \t\t}                 if(strlen($res) &gt; 0)                     echo substr($res,0,-1); \t} } <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u0432\u0430\u0442\u044c  <\/p>\n<pre><code class=\"php\">$resp = new NetResponse; $resp-&gt;AddParam(&quot;points&quot;,&quot;123456&quot;); \/\/... echo response.SendResponse(); <\/code><\/pre>\n<h5>\u0418\u0442\u043e\u0433\u043e<\/h5>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u043b + \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0430\u0441, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 %username%\u044b, \u043a\u0430\u043a \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 WWW, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438? \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/211482\/\"> http:\/\/habrahabr.ru\/post\/211482\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c6c\/e85\/8b5\/c6ce858b5b5d4e6ff026422355949b93.jpg\"\/><br \/>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0438\u043a\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 WWW \u0432 Unity3D.<\/p>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 WWW?<\/p>\n<p>  <b>WWW<\/b> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0435\u0431 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 URL \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0431\u0430\u043d\u0434\u043b\u044b. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0432 \u0441\u043f\u0440\u0430\u0432\u043a\u0435 (<a href=\"http:\/\/docs.unity3d.com\/Documentation\/ScriptReference\/WWW.html\">\u043a\u043b\u0430\u0446<\/a>).<\/p>\n<p>  \u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h5>\u041f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043a\u0438<\/h5>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0438\u0433\u0440\u0443 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 Php(\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u043f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0438 backend \u0447\u0430\u0441\u0442\u0438). \u0412\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u0432\u0438\u0434\u0435 new WWW(Address + &quot;?api=login&#038;username=&#8230;&quot;); \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u043e\u0441\u044b\u043b\u043a\u043e\u0439\/\u043f\u0440\u0438\u0435\u043c\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0437\u0430\u0433\u0432\u043e\u0437\u0434\u043a\u0430: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0441\u043e\u0437\u0440\u0435\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0433\u043b\u043e \u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 WWW.text.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-211482","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211482"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211482\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}