0

I'm using an ancient API, that sends the result over GET method to my app. So user will redirect to my action with a url like that:

http://example.com/api/result?request=102&state=1

It's doesn't look like nice.. also I don't want the user knows his request and state (which the API sends by GET and I can't set it to post them)

Can CakePHP get the query string and store it in session then removes it from url? automatically...

1 Answer 1

1

No it cant. Since you are using an ancient API and cannot change the request method to POST, theres nothing any framework could do.

But you could do something like change the URL pretty fast (depends on the user connection/browser speed) using something like the PHP function header("LOCATION: http://example.com/api/result"); Still, the user could see for a brief moment the request and state values. Or he can always stop the request pressing the browser stop button...

Sign up to request clarification or add additional context in comments.

1 Comment

Ok, So I wrote an extra action to store query string in session and redirect user to new page without the query strings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.