Redirect URL in my Xdata service API

At the end of my Service function , i need to do a redirect like i can do in Python flask (return redirect("http://www.example.com", code=302). How can i do that in my Xdata function. How can i respond with a 302 redirect. I found this code

if Context.Request.Uri.Path = '/tms/xdata' then
Context.Request.RawUri := Context.Request.RawUri + '/echostring';
Next(Context);

But i don't understand the Next command .

  with TXDataOperationContext.Current do
  begin
    Response.Headers.AddValue('Location', 'https://www.example.com/');
    Handler.SetStatusCode(302);
  end;

1 Like

Thank you, it's perfect !!!!!

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.