I am making a cloud page to be a subscription centre. When the page is requested with a GET I want the user to submit a form on the page. When the page is requested with a POST, I want to unsubscribe the user.
According to this page when a cloud page is requested with a get request,
@@ExecCtx == "LOAD". When the page is requested with post request,
@@ExecCtx == "POST".
However I can't seem to make this happen.
I made a cloud page that posts to itself:
%%[ VAR @key, @test SET @key = IsNullDefault(RequestParameter('key'), 'null') Set @action = CloudPagesURL(862, 'key', @key) ]%% <form action="%%=Concat(@action)=%%" name="subscribeForm" method="POST"> ... <br>Context: %%=Concat(@@ExecCtx)=%% <br>Request Parameter 'key' : %%=Concat(@key)=%% <br>Listname: %%_listname%% <br>GET: %%[[type="Get"] Output(Now()) ]%% <br>POST: %%[[type="Post"] Output(Now()) ]%% </form>
However, even after submitting, and verifying that the request method is POST rather than GET, it seems to display only as a GET request?