Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to send POST HTTP request from Google Chrome without any extensions?

Can we send POST HTTP requests in Google Chrome when using Rest Services? I have tried few extensions but I need directly from Chrome browser

like image 526
Chandra Shekhar Avatar asked Sep 23 '15 09:09

Chandra Shekhar


People also ask

Can I send a POST request from Chrome?

You cannot make a POST request by using a web browser, as web browsers only directly support GET requests. For this example, we assume that you have installed a REST client browser plugin. Chrome and Firefox both support open source Rest Client plugins that allow for the invocation of REST APIs from the browser.

How can we send a HTTP request without using browser?

Send an HTTP request by creating a URL and getting the connection for it, and casting it to HttpURLConnection. Add an "If-Modified-Since" header, with the download date of your local file. If the server responds with 304 (not modified), then your local version is up-to-date.


1 Answers

You can do the post and get in the same way as the browser does. You can use the header to put in information in key, value pair. Here is a tutorial on how you can do it - Send POST data using XMLHttpRequest

But it would be better if you use chrome extension POSTMAN which is very extensive and clean for testing REST services.

like image 65
Dev Utkarsh Avatar answered Sep 28 '22 03:09

Dev Utkarsh