asg017 / sqlite-http

A SQLite extension for making HTTP requests purely in SQL
MIT License
229 stars 11 forks source link

Add new `http_clients` virtual table #26

Open asg017 opened 2 years ago

asg017 commented 2 years ago
.load http0
insert into http_clients(name, headers, rate_limit)
  select 
    'github_api', 
    http_headers('User-Agent', 'xxx/1.0.0', 'X-Api-Key', '...'),
    100;

select http_get(
  'https://api.github.com/....', 
  null, 
  null, 
  null, 
  json_object('client', 'github_api')
);