Skip to content

Richienb/got-xml

Repository files navigation

got-xml Travis CI Build Status

Got XML support.

NPM Badge

Install

npm install got-xml

Usage

const got = require("got");
const xmlGot = got.extend(require("got-xml")());

(async () => {
	const { body } = await xmlGot("https://www.w3schools.com/xml/simple.xml");

	console.log(body);
	//=> { breakfast_menu: { food: ... } }
})();

API

xmlGot(options?)

options

Type: object

Options to pass to xml2js.