-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separating into API and Client #24
Comments
Do you own that heroku app? Can you check the logs? |
Yep, I own it! Here are the logs. It looks like its going into the update_post method because it can't properly read the params: Marissa-Montgomerys-MacBook-Pro-2:RecsyWebsiteDeployAPI marissamontgomery$ heroku logs |
Not really an issue but I've just started learning rails and I've been trying to separate this project into a client that doesn't use Sinatra and a json API for a few days now, and I'm getting internal server errors when I try to access /save-post by doing this:
uri = URI('http://hidden-caverns-8480.herokuapp.com/admin/save-post.json')
req = Net::HTTP::Post.new(uri.path)
req.basic_auth username, password
data = {
"method" => "put",
"post" => { "title" => "mytitleeee", "name" => "gjh", "content" => "hiiii" },
"commit" => "Save",
"ajax" => "true"
}.to_json
req.content_type = 'application/json'
req.body = data
http = Net::HTTP.new(uri.host, uri.port)
@myResponse = http.start {|http| http.request(req) }
Any advice? Thanks!
The text was updated successfully, but these errors were encountered: