Is there a way to make an HTTP request using the Chrome Developer tools without using a plugin like POSTER?
I know, old post ... but it might be helpful to leave this here.
Modern browsers are now supporting the Fetch API.
You can use it like this:
fetch("<url>")
.then(data => data.json()) // could be .text() or .blob() depending on the data you are expecting
.then(console.log); // print your data
ps: It will make all CORS checks, since it's an improved XmlHttpRequest
.
$.post(
'dom/data-home.php',
{
type : "home", id : "0"
},function(data){
console.log(data)
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
If your web page has jquery in your page, then you can do it writing on chrome developers console:
$.get(
"somepage.php",
{paramOne : 1, paramX : 'abc'},
function(data) {
alert('page content: ' + data);
}
);
Its jquery way of doing it!
If you want to edit and reissue a request that you have captured in Chrome Developer Tools' Network tab:
Name
of the requestCopy > Copy as cURL
Expanding on @dhfsk answer
Here's my workflow
From Chrome DevTools, right-click the request you want to manipulate > Copy as cURL
Open Postman
Import
in the upper-left corner then Paste Raw Text
Keeping it simple, if you want the request to use the same browsing context as the page you are already looking at then in the Chrome console just do:
window.location="https://www.example.com";