Created
September 11, 2020 12:04
-
-
Save otukutun/f9d673231547025181db4538a1700529 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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