Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HtmlWidget companion api

API

Features

iframe

Some web services (e.g. Twitter) will not render properly if their embedded code is used as a data URI within a web view. The iframe api will receive the HTML and render a proper web page to help with that. It supports both GET and POST request to accommodate large input.

GET request

curl https://html-widget-api.vercel.app/iframe.ts\?body=hello

Output:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
</head>
<body>hello</body>
</html>

POST request

curl https://html-widget-api.now.sh/iframe.ts -d body=lorem+lipsum

Output

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
</head>
<body>lorem lipsum</body>
</html>

Deployment

The repository has been configured to deploy to vercel.app automatically upon changes within ./api. If it's merged into master, it'll be deployed to https://html-widget-api.vercel.app.

About

HtmlWidget companion api.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages