Skip to main content
replaced http://superuser.com/ with https://superuser.com/
Source Link

Pressing this button will only cause the browser to submit a POST request to the server, together with all the values of the according form as payload in the body of the request.

So if you want the effect of this click reproduced in a shell script, what you have to do is to build your data in the format it's passed in a POST request, and then submit a POST to the server to emulate the pressing of the button.

It should be quite easy to do this with curl, just like described here: What is the cURL command-line syntax to do a POST request?What is the cURL command-line syntax to do a POST request?

Example:

curl --data "param1=value1&param2=value2" http://example.com/resource.cgi

Pressing this button will only cause the browser to submit a POST request to the server, together with all the values of the according form as payload in the body of the request.

So if you want the effect of this click reproduced in a shell script, what you have to do is to build your data in the format it's passed in a POST request, and then submit a POST to the server to emulate the pressing of the button.

It should be quite easy to do this with curl, just like described here: What is the cURL command-line syntax to do a POST request?

Example:

curl --data "param1=value1&param2=value2" http://example.com/resource.cgi

Pressing this button will only cause the browser to submit a POST request to the server, together with all the values of the according form as payload in the body of the request.

So if you want the effect of this click reproduced in a shell script, what you have to do is to build your data in the format it's passed in a POST request, and then submit a POST to the server to emulate the pressing of the button.

It should be quite easy to do this with curl, just like described here: What is the cURL command-line syntax to do a POST request?

Example:

curl --data "param1=value1&param2=value2" http://example.com/resource.cgi
Source Link
replay
  • 8.7k
  • 1
  • 28
  • 34

Pressing this button will only cause the browser to submit a POST request to the server, together with all the values of the according form as payload in the body of the request.

So if you want the effect of this click reproduced in a shell script, what you have to do is to build your data in the format it's passed in a POST request, and then submit a POST to the server to emulate the pressing of the button.

It should be quite easy to do this with curl, just like described here: What is the cURL command-line syntax to do a POST request?

Example:

curl --data "param1=value1&param2=value2" http://example.com/resource.cgi