require 'net/http'
require 'json'
uri = URI('https://api.tggl.io/flags')
req = Net::HTTP::Post.new(uri)
req.content_type = 'application/json'
req['x-tggl-api-key'] = 'API_KEY'
req.body = {
'userId' => 'foo',
'email' => 'foo@gmail.com'
}.to_json
req_options = {
use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(req)
end
Empower product and marketing teams to experiment within safe boundaries set by your engineering team.
Your app is instantly updated when a flag is updated, no need to write code and deploy the new version.