Archived Forum Post

Index of archived forum posts

Question:

GET parameter is being sent as POST parameter

May 29 '15 at 11:20

i need to make a x-www-form-urlencoded type post to a url like

string url = "http://www.mysite.com/submit_data.php?next="; add i am adding a couple of post parameter, but problem is an extra post parameter is being added to list of POST params.

next is sent as POST parameter, it should have been sent in the URL!

this is wrong :::

POST /submit_data.php HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded
Host: www.mysite.com
Content-Length: 178

post_data = next=& + [remaining data]

It should be sent as

POST /submit_data.php?next= HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded
Host: www.mysite.com
Content-Length: 178

post_data = [remaining data]

Answer

See this example:

Android: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

C: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

C#: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

C# WinRT: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

C++: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Classic ASP: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

DataFlex: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Delphi ActiveX: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Delphi DLL: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Java: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Lianja: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

MFC: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Objective-C: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Perl: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

PHP ActiveX: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

PHP Extension: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

PowerBuilder: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

PowerShell: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

PureBasic: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Python: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Ruby: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

SQL Server: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Swift: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Unicode C: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Unicode C++: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

VB.NET: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

VB.NET WinRT: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

VBScript: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Visual Basic 6.0: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body

Visual FoxPro: HTTP POST with some Params in URL and others in application/x-www-form-urlencoded Body