NetTalk Central

Author Topic: Have p_web.Redirect use POST instead of GET.  (Read 3799 times)

JPMacDonald

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • Email
Have p_web.Redirect use POST instead of GET.
« on: June 29, 2015, 10:43:05 AM »
The p_web.Redirect(...) appears to do a GET, is it possible to have it do a POST instead?
I'm trying to redirect to another site's page (within my own domain) and pass some values to it using POST.

Thanks

Parker

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Have p_web.Redirect use POST instead of GET.
« Reply #1 on: June 29, 2015, 11:08:11 PM »
Hi Parker,

I presume you are talking about the web server side, not the web client side here?

If you want to redirect an incoming POST then you can do so with;

p_web.redirect(toURL,  , true).

The 3rd parameter tells it to repost.

The whole prototype for Redirect is

NetWebServerWorker.Redirect PROCEDURE(String p_to, Long p_ToSecure=0, Long p_Repost=1, Long p_Type=301)

Cheers
Bruce

JPMacDonald

  • Full Member
  • ***
  • Posts: 106
    • View Profile
    • Email
Re: Have p_web.Redirect use POST instead of GET.
« Reply #2 on: June 30, 2015, 03:56:53 AM »
Hi Bruce,

Yes I was thinking of it from the server side.

You've made me realize I was looking at this all wrong and now need to rethink the approach.
Some desktop client habits are just hard to break!!!!

Regards
Parker