This API powering HTML / ERB to Slim Converter - GIZ Tool.
curl --location --request POST 'https://slim-converter-api.herokuapp.com/convert' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'raw_text=<html>
<head>
<title>Enter Your Code Here</title>
<%= foo = [1,2,3] %>
<body>
<%= foo.each do |bar| %>
<p>Or click Convert to test it out!</p>
</body>
</head>
</html>'
var form = new FormData();
form.append("raw_text", `<html>
<head>
<title>Enter Your Code Here</title>
<%= foo = [1,2,3] %>
<body>
<%= foo.each do |bar| %>
<p>Or click Convert to test it out!</p>
</body>
</head>
</html>`);
var settings = {
"url": "https://slim-converter-api.herokuapp.com/convert",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Feel free to use it, but uptime is not guarantee or deploy this API in Heroku.