Takes a url, and data in form of URLSearchParams, and header, then performs http POST request and converts result to json then returns the json.
Heres a post example that returns a json object.
const params = new URLSearchParams();params.append('a', 1);let headers = {} ; let url = "" ; let result = await post_with_headers_get_json(url, params, headers) ; Copy
const params = new URLSearchParams();params.append('a', 1);let headers = {} ; let url = "" ; let result = await post_with_headers_get_json(url, params, headers) ;
Takes a url, and data in form of URLSearchParams, and header, then performs http POST request and converts result to json then returns the json.