Skip to content

Instantly share code, notes, and snippets.

@otukutun
Created September 11, 2020 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otukutun/f9d673231547025181db4538a1700529 to your computer and use it in GitHub Desktop.
Save otukutun/f9d673231547025181db4538a1700529 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
require 'sinatra'
require 'sinatra/reloader'
require 'sinatra/json'
post '/images' do
image = {name: 'i_like_dog_very_much', url: 'https://example.com/image.png'}
# p request
json image
end
# bundle install --path vendor/bundle
# bundle exec ruby app.rb
# POST http:locahost:4567/images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment