Send POST requests via browser or other program

Asked

Viewed 4,887 times

1

By the browser it is possible to only perform gets by entering the url in the browser, would have some way to make POST requests by the browser or other application, this will greatly facilitate mine when it is maintaining the server. I was taking a look and is possible by the command propt using the curl but I couldn’t adapt very well.

The reason for this, basically I’m making the server first because the designer has not finished drawing the screens, so I would like to go getting my server ready.

  • 1

    Your question was a little confusing, but I think Postman might be able to help you. Look for the chorme plugin, in it you can send all kinds of requests and test services like REST.

  • Dude you saved my night, that’s exactly what I was looking for, did not know of the existence of this plugin, thank you

  • You can use Postman, it now has a version for Windows / Mac. if it is SOAP still has SOAPUI as an option.

1 answer

3


Sending requests with CURL is nothing to worry about. See an example:

1 - Sending request with CURL with a JSON

The example below makes a POST request on a host by passing a JSON and doing a basic authentication.

curl -X POST --data "@nome_do_arquivo.json" -H "Content-
Type:application/json" 
    -H "Authorization:key=AIzaSyAdb8MI_4j1_CSiG-GSfjkO84CZ06P9VyA" 
http://meuservidor_.com.br

-X POST: Indicates that a POST request will be made

-H: Adding a row to the header where the content is a JSON

"Authorization:key=: Basic authentication

For more information use Curl --help

2 - Using the POSTMAN

Another alternative is to use the Postman, Chrome plug-in. Can be found here

You can even use Postman for other purposes like testing a Restful server.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.