Skip to content

Instantly share code, notes, and snippets.

@forforf
Created April 16, 2012 16:35
Show Gist options
  • Save forforf/2399831 to your computer and use it in GitHub Desktop.
Save forforf/2399831 to your computer and use it in GitHub Desktop.
Barebones Sinatra App
post '/' do
session = login(params[:username], params[:password])
get_courses(session, params[:username])
erb :index
end
def login(username, password)
#login = Savon::Client.new($LOGIN_WSDL)
#login.http.auth.ssl.verify_mode = :none
#session = login.request(:login) do
# soap.body = { :id => username, :pw => password }
#end
#session.to_hash
session = {:jamming => :with_Bob}
end
def get_courses(session, username)
@courses = ["Reggae", "Marley's Philosophy"]
end
@lyonsinbeta
Copy link

This helped me figure out my problem. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment