Level 46
You could try reading the docs.
axios.post('http://mereac.dev/')
.then(response => body_data = response.data))
.catch(error => console.log(error));
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
here is I try to convert this jquery ajax call jqery to axios but could not getting clue here is my code
chrome.runtime.onInstalled.addListener(function() {
var body = "selection";
var name = "jhone doe";
var all_col = chrome.contextMenus.create({"name": name, "contexts":[body],"id": "context_selection"});
});
var open_window_ids=[]
function getSummary(body_resp) {
var body_data;
$.ajax({
url: 'http://mereac.dev/',
type: 'POST',
data: JSON.stringify(body_resp),
contentType: 'application/json; charset=utf-8',
dataType: 'json',
async: false,
success: function(data) {
body_data = data;
}
});
return body_data;
}
Please or to participate in this conversation.