Submit POST requests by browser or other program

0

By the browser it is possible to only accomplish gets by inserting the url in the browser, would have some way to do POST requests by the browser or another application, this would facilitate my a lot when it is to maintain the server. It was taking a look and it is possible by the command propt using curl but I could not adapt very well.

The reason for this, I'm basically doing the server first because the designer has not finished drawing the screen, so I'd like to leave my ready server ready.

    
asked by anonymous 16.01.2018 / 23:29

1 answer

1

Sending requests with CURL is nothing to write home about. Here's 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 performing 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 line to the header where the content is a JSON

"Authorization: key = : Basic Authentication

  

For more information use curl --help

2 - Using POSTMAN

Another alternative is to use the PostMan chrome plug-in. You can find here

In addition you can also use PostMan for other purposes like testing a Restful server.

    
16.01.2018 / 23:52