Created
August 30, 2009 20:57
-
-
Save zdennis/178129 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
url = "http://localhost:8000/spackle1/api/studentprojects/d0d84e45657d4841b504db75a196d708/tasks/6999dc92dee6485980a59c8b9c74e4e7/submissions/" | |
body = { | |
:url => "http://test/url", | |
:content => "description test ABC123" | |
} | |
a = Net::HTTP.post_form URI.parse(url), :request => body.to_json, :headers => { "Content-Type" => "application/json" } |
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
POST /spackle1/api/studentprojects/d0d84e45657d4841b504db75a196d708/tasks/6999dc92dee6485980a59c8b9c74e4e7/submissions/ HTTP/1.1 | |
Accept: */* | |
Content-Type: application/x-www-form-urlencoded | |
Content-Length: 155 | |
Host: localhost:8000 | |
headers=Content-Typeapplication%2fjson&request=%7b%22content%22%3a%22description%20test%20ABC123%22%2c%22url%22%3a%22http%3a%5c%2f%5c%2ftest%5c%2furl%22%7d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment