title: Delphi Berlin Rest interface POST behavior wrong
body: <h1>After upgrading from Delphi XE10 Seattle to Berlin, my REST interface does no longer work properly.</h1>
  
  <h3>The POST request returns a 302 FOUND redirect.</h3>
  
  <p>In Seattle, a new POST to the redirected url is issued, and the resource is created.</p>
  
  <p>In Berlin, the 302 FOUND is answered with a GET, resulting in a list of existing resources being returned i.s.o. the id.</p>
  
  <p>network trace :</p>
  
  <h3>SEATTLE</h3>
  
  <pre><code>No.     Time           Source                Destination           Protocol Length Info
    1 0.000000       192.168.1.99          159.253.0.125         TCP      66     62766→80 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
    2 0.019867       159.253.0.125         192.168.1.99          TCP      66     80→62766 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1452 SACK_PERM=1 WS=128
    3 0.020024       192.168.1.99          159.253.0.125         TCP      54     62766→80 [ACK] Seq=1 Ack=1 Win=66560 Len=0
    4 0.032015       192.168.1.99          159.253.0.125         HTTP/XML 920    POST /api/specific_price_rules/?ws_key=_______MY_SECRET_WEB_KEY________ HTTP/1.1 
    5 0.049632       159.253.0.125         192.168.1.99          TCP      60     80→62766 [ACK] Seq=1 Ack=867 Win=7680 Len=0
    6 0.278089       159.253.0.125         192.168.1.99          HTTP     407    HTTP/1.0 302 Found 
    7 0.278426       159.253.0.125         192.168.1.99          TCP      60     80→62766 [FIN, ACK] Seq=354 Ack=867 Win=7680 Len=0
    8 0.278480       192.168.1.99          159.253.0.125         TCP      54     62766→80 [ACK] Seq=867 Ack=354 Win=66304 Len=0
    9 0.279197       192.168.1.99          159.253.0.125         TCP      54     62766→80 [ACK] Seq=867 Ack=355 Win=66304 Len=0
   10 0.279327       192.168.1.99          159.253.0.125         TCP      54     62766→80 [FIN, ACK] Seq=867 Ack=355 Win=66304 Len=0
   11 0.282931       192.168.1.99          159.253.0.125         TCP      66     62767→80 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
   12 0.303173       159.253.0.125         192.168.1.99          TCP      60     80→62766 [ACK] Seq=355 Ack=868 Win=7680 Len=0
   13 0.303307       159.253.0.125         192.168.1.99          TCP      66     80→62767 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1452 SACK_PERM=1 WS=128
   14 0.303416       192.168.1.99          159.253.0.125         TCP      54     62767→80 [ACK] Seq=1 Ack=1 Win=66560 Len=0
   15 0.329188       192.168.1.99          159.253.0.125         HTTP/XML 984    POST /api/specific_price_rules/?ws_key=_______MY_SECRET_WEB_KEY________?url=specific_price_rules%2F&amp;ws_key=_______MY_SECRET_WEB_KEY________ HTTP/1.1 
   16 0.346802       159.253.0.125         192.168.1.99          TCP      60     80→62767 [ACK] Seq=1 Ack=931 Win=7808 Len=0
   17 0.772415       159.253.0.125         192.168.1.99          HTTP/XML 1193   HTTP/1.1 201 Created 
   18 0.823564       192.168.1.99          159.253.0.125         TCP      54     62767→80 [ACK] Seq=931 Ack=1140 Win=65536 Len=0
   19 2.792272       159.253.0.125         192.168.1.99          TCP      60     80→62767 [FIN, ACK] Seq=1140 Ack=931 Win=7808 Len=0
   20 2.792381       192.168.1.99          159.253.0.125         TCP      54     62767→80 [ACK] Seq=931 Ack=1141 Win=65536 Len=0
   21 2.792460       192.168.1.99          159.253.0.125         TCP      54     62767→80 [FIN, ACK] Seq=931 Ack=1141 Win=65536 Len=0
   22 2.809253       159.253.0.125         192.168.1.99          TCP      60     80→62767 [ACK] Seq=1141 Ack=932 Win=7808 Len=0
  </code></pre>
  
  <h3>BERLIN</h3>
  
  <pre><code>No.     Time           Source                Destination           Protocol Length Info
    1 0.000000       192.168.1.99          159.253.0.125         TCP      66     50854→80 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
    2 0.028660       159.253.0.125         192.168.1.99          TCP      66     80→50854 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1452 SACK_PERM=1 WS=128
    3 0.028816       192.168.1.99          159.253.0.125         TCP      54     50854→80 [ACK] Seq=1 Ack=1 Win=66560 Len=0
    4 0.159076       192.168.1.99          159.253.0.125         HTTP/XML 920    POST /api/specific_price_rules/?ws_key=_______MY_SECRET_WEB_KEY________ HTTP/1.1 
    5 0.177091       159.253.0.125         192.168.1.99          TCP      60     80→50854 [ACK] Seq=1 Ack=867 Win=7680 Len=0
    6 0.252763       159.253.0.125         192.168.1.99          HTTP     407    HTTP/1.0 302 Found 
    7 0.252764       159.253.0.125         192.168.1.99          TCP      60     80→50854 [FIN, ACK] Seq=354 Ack=867 Win=7680 Len=0
    8 0.253495       192.168.1.99          159.253.0.125         TCP      54     50854→80 [ACK] Seq=867 Ack=355 Win=66304 Len=0
    9 0.253633       192.168.1.99          159.253.0.125         TCP      54     50854→80 [FIN, ACK] Seq=867 Ack=355 Win=66304 Len=0
   10 0.256926       192.168.1.99          159.253.0.125         TCP      66     50857→80 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
   11 0.270249       159.253.0.125         192.168.1.99          TCP      60     80→50854 [ACK] Seq=355 Ack=868 Win=7680 Len=0
   12 0.274200       159.253.0.125         192.168.1.99          TCP      66     80→50857 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1452 SACK_PERM=1 WS=128
   13 0.274327       192.168.1.99          159.253.0.125         TCP      54     50857→80 [ACK] Seq=1 Ack=1 Win=66560 Len=0
   14 0.277184       192.168.1.99          159.253.0.125         HTTP     423    GET /api/specific_price_rules/?ws_key=_______MY_SECRET_WEB_KEY________?url=specific_price_rules%2F&amp;ws_key=_______MY_SECRET_WEB_KEY________ HTTP/1.1 
   15 0.294220       159.253.0.125         192.168.1.99          TCP      60     80→50857 [ACK] Seq=1 Ack=370 Win=6912 Len=0
   16 0.511007       159.253.0.125         192.168.1.99          HTTP/XML 597    HTTP/1.1 200 OK 
   17 0.561407       192.168.1.99          159.253.0.125         TCP      54     50857→80 [ACK] Seq=370 Ack=544 Win=66048 Len=0
   18 2.510340       159.253.0.125         192.168.1.99          TCP      60     80→50857 [FIN, ACK] Seq=544 Ack=370 Win=6912 Len=0
   19 2.510429       192.168.1.99          159.253.0.125         TCP      54     50857→80 [ACK] Seq=370 Ack=545 Win=66048 Len=0
   20 2.510533       192.168.1.99          159.253.0.125         TCP      54     50857→80 [FIN, ACK] Seq=370 Ack=545 Win=66048 Len=0
   21 2.526591       159.253.0.125         192.168.1.99          TCP      60     80→50857 [ACK] Seq=545 Ack=371 Win=6912 Len=0
  </code></pre>
  
  <h3>Sample code</h3>
  
  <pre><code>procedure TForm1.Button8Click(Sender: TObject);
  var
    aNode, aCNode, aCCNode: IXMLNode;
    i, j: integer;
    aXml, s: string;
  begin
    Button8.Enabled := False;
    try
      RESTRequest1.ResetToDefaults;
      RESTRequest1.Params.Clear;
      RESTClient1.BaseURL := sWebAddress;
      RESTRequest1.Resource := Edit1.Text;
      RESTClient1.Authenticator := nil;
      SimpleAuthenticator1.UserNameKey := '';
      SimpleAuthenticator1.UserName := '';
      RESTRequest1.ResourceSuffix := '?ws_key=' + sWebkey;
      RESTRequest1.ClearBody;
      RESTRequest1.AddBody(Memo1.Text, ctTEXT_XML);
      RESTRequest1.Method := rmPost;
      RESTRequest1.Execute;
      Memo2.Lines.Clear;
      Memo2.Lines.Add(RESTResponse1.Content);
    except
      on E: Exception do
      begin
        Memo2.Lines.Clear;
        Memo2.Lines.Add('Exception class name = ' + E.ClassName);
        Memo2.Lines.Add('Exception message = ' + E.Message);
      end;
    end;
    Button8.Enabled := True;
  end;
  </code></pre>