This file contains 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
# You are free to copy and use this code in any way you see fit | |
# with absolutely no requirements, but no warranty is provided. | |
require 'rubygems' | |
require 'sinatra/base' | |
require 'net/http' | |
require 'logger' | |
module PassThroughProxy | |
class Api < Sinatra::Base | |
attr_accessor :logger |
This file contains 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
require 'sinatra/base' | |
require 'json' | |
require 'pathname' | |
FIXTURESDIR="fixtures" | |
class JSONFileServer < Sinatra::Base | |
#TODO: When request is not JSON return 406 | |
# when request.accept.include?("application/json") #JSON requested |