HTTP Post with URL parameters like GET?

I realize this is not a normal use-case, but is it legal?  We would like to take a GET request (with a fairly complex URL parameter list), change the method to a POST, and add *additional* data to the body via the POST data.  However, we want to keep the URL parameters constant to maintain compatibility with existing code.

So, summarizing, the POST URL might be something like:

DATA: param4=yes&param5=no....

Who is Participating?
Jason C. LevineConnect With a Mentor No oneCommented:
>> Can there be parameters in the URL and the POST headers?

Not sure about .NET (I don't use it) but with PHP, yes.

<form method="post" action="somescript.php?somevar=1&someothervar=2">
<input type="hidden" name="yetanothervar" value="3" />

On somescript.php, the following would be available for handling:


So long as the query string is present, both the $_GET and $_POST arrays can contain values.
Jason C. LevineNo oneCommented:
Hi mikecrowe,

I'm not sure I understand what you want.  Can you explain better and also indicate which language will process the request?

For example, PHP allows variables to exist in both the query string and the post array...
mikecroweAuthor Commented:
At this point, we haven't chosen the application language, but are leaning towards .NET.  PHP is also an option.

Basically, I think you understand.  Can there be parameters in the URL and the POST headers?
mikecroweAuthor Commented:
Perfect, jason1178.  Many thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.