├── public ├── .gitignore ├── favicon.ico ├── img │ ├── logo.png │ ├── pony.png │ ├── delete.png │ ├── favicon.gif │ ├── rainbow.png │ ├── unicorn.png │ ├── background.jpg │ ├── buttonbg.png │ ├── facebox │ │ ├── b.png │ │ ├── bl.png │ │ ├── br.png │ │ ├── tl.png │ │ ├── tr.png │ │ ├── logo.png │ │ ├── loading.gif │ │ ├── shadow.gif │ │ └── closelabel.gif │ ├── pony-hurl.png │ ├── ajax-loader.gif │ ├── message-info.png │ ├── message-warn.png │ └── autocomplete-loader.gif ├── robots.txt ├── css │ ├── jquery.autocomplete.css │ ├── reset.css │ ├── facebox.css │ ├── pygment_trac.css │ └── style.css └── js │ ├── jquery.relatize_date.js │ ├── hurl.headers.js │ ├── hurl.js │ ├── facebox.js │ ├── jquery.autocomplete.js │ ├── json2.js │ ├── jquery.form.js │ └── jquery.js ├── tmp └── .gitignore ├── .gitignore ├── app ├── views │ ├── about.rb │ ├── view.rb │ ├── hurls.rb │ ├── layout.rb │ ├── stats.rb │ └── index.rb ├── templates │ ├── 500.mustache │ ├── 404.mustache │ ├── stats.mustache │ ├── hurls.mustache │ ├── view.mustache │ ├── about.mustache │ ├── layout.mustache │ └── index.mustache ├── helpers │ ├── sinatra.rb │ └── pretty_printing.rb ├── libraries.rb ├── models │ ├── db.rb │ └── user.rb ├── helpers.rb └── app.rb ├── test ├── json └── xml ├── config.ru ├── Gemfile ├── hurls.yaml ├── LICENSE ├── Gemfile.lock ├── docs └── index.mustache ├── README.md └── Rakefile /public/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | db/ 2 | .bundle/ 3 | bin/ 4 | -------------------------------------------------------------------------------- /app/views/about.rb: -------------------------------------------------------------------------------- 1 | module Views 2 | class About < Layout 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/logo.png -------------------------------------------------------------------------------- /public/img/pony.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/pony.png -------------------------------------------------------------------------------- /public/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/delete.png -------------------------------------------------------------------------------- /public/img/favicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/favicon.gif -------------------------------------------------------------------------------- /public/img/rainbow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/rainbow.png -------------------------------------------------------------------------------- /public/img/unicorn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/unicorn.png -------------------------------------------------------------------------------- /public/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/background.jpg -------------------------------------------------------------------------------- /public/img/buttonbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/buttonbg.png -------------------------------------------------------------------------------- /public/img/facebox/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/b.png -------------------------------------------------------------------------------- /public/img/facebox/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/bl.png -------------------------------------------------------------------------------- /public/img/facebox/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/br.png -------------------------------------------------------------------------------- /public/img/facebox/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/tl.png -------------------------------------------------------------------------------- /public/img/facebox/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/tr.png -------------------------------------------------------------------------------- /public/img/pony-hurl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/pony-hurl.png -------------------------------------------------------------------------------- /public/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/ajax-loader.gif -------------------------------------------------------------------------------- /public/img/facebox/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/logo.png -------------------------------------------------------------------------------- /public/img/message-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/message-info.png -------------------------------------------------------------------------------- /public/img/message-warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/message-warn.png -------------------------------------------------------------------------------- /public/img/facebox/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/loading.gif -------------------------------------------------------------------------------- /public/img/facebox/shadow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/shadow.gif -------------------------------------------------------------------------------- /public/img/autocomplete-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/autocomplete-loader.gif -------------------------------------------------------------------------------- /public/img/facebox/closelabel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defunkt/hurl/HEAD/public/img/facebox/closelabel.gif -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | 3 | User-agent: * 4 | Disallow: /hurls/ 5 | -------------------------------------------------------------------------------- /test/json: -------------------------------------------------------------------------------- 1 | {"user":{"created_at":"2008/11/13 20:08:42 -0600","public_gist_count":0,"public_repo_count":4,"following_count":0,"id":23,"followers_count":0,"login":"defunkt"}} -------------------------------------------------------------------------------- /app/templates/500.mustache: -------------------------------------------------------------------------------- 1 |
| {{ stat }} | 8 |{{ value }} | 9 |
| {{ stat }} | 19 |{{ value }} | 20 |
25 | Deployed SHA: 26 | {{ deployed_sha }} 27 |
28 || {{ url }} | 7 |{{ method }} | 8 |{{ auth }} | 9 |{{ date }} | 10 |![]() |
11 |
19 | We found some hurls, but none are yours.
20 |
15 |
16 |
29 | Hurl makes HTTP requests.
4 |Choose the request method, customize headers and POST parameters, add basic authorization, and even follow redirects. 5 | Then view the nicely formatted request and response.
6 |It's the perfect tool for testing APIs. Just enter a URL and click send.
7 |Hurl was created by Chris Wanstrath and Leah Culver 20 | for the 2009 Rails Rumble.
21 |Follow Hurl on Twitter: @hurlit
22 |Grab the source code: http://github.com/defunkt/hurl
23 |... and it's kind of like cURL.
25 |#{lines.join}Hurl makes HTTP requests.
113 |Enter a URL, set some headers, view the response, then share it with others.
114 |Perfect for demoing and debugging APIs.
115 |133 | 136 | 137 | request response 138 | 139 |
140 | 145 |{{{ header }}}{{{ body }}}
149 | {{/ view }}
150 | ' + data.header + '' + data.body) 215 | $('.help-blurb').hide() 216 | $('#request-and-response').show() 217 | } else { 218 | $('#flash-error-msg').html("Weird response. Sorry.") 219 | $('.flash-error').show() 220 | } 221 | 222 | $('#send-wrap').children().toggle() 223 | }) 224 | 225 | return false 226 | }) 227 | 228 | // delete hurl 229 | $('.hurl-delete').click(function() { 230 | $(this).parents('tr:first').remove() 231 | $.ajax({type: 'DELETE', url: $(this).attr('href')}) 232 | return false 233 | }) 234 | 235 | // toggle request/response display 236 | $('.toggle-reqres-link').click(function(){ 237 | $('.toggle-reqres').toggle() 238 | $('#code-request').toggle() 239 | $('#code-response').toggle() 240 | return false 241 | }) 242 | 243 | // flash close 244 | $('.flash-close').click(function (){ 245 | $(this).parent().fadeOut() 246 | return false 247 | }) 248 | 249 | // facebox 250 | $('a[rel*=facebox]').facebox({ opacity: 0.4 }) 251 | $(document).bind('reveal.facebox', function() { 252 | Hurl.labelHints('#facebox input[title]') 253 | $('#facebox .footer').remove() 254 | }) 255 | 256 | // in-field labels 257 | Hurl.labelHints('input[title]') 258 | 259 | // relatize dates 260 | $('.relatize').relatizeDate() 261 | }); 262 | -------------------------------------------------------------------------------- /public/js/facebox.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Facebox (for jQuery) 3 | * version: 1.2 (05/05/2008) 4 | * @requires jQuery v1.2 or later 5 | * 6 | * Examples at http://famspam.com/facebox/ 7 | * 8 | * Licensed under the MIT: 9 | * http://www.opensource.org/licenses/mit-license.php 10 | * 11 | * Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ] 12 | * 13 | * Usage: 14 | * 15 | * jQuery(document).ready(function() { 16 | * jQuery('a[rel*=facebox]').facebox() 17 | * }) 18 | * 19 | * Terms 20 | * Loads the #terms div in the box 21 | * 22 | * Terms 23 | * Loads the terms.html page in the box 24 | * 25 | * Terms 26 | * Loads the terms.png image in the box 27 | * 28 | * 29 | * You can also use it programmatically: 30 | * 31 | * jQuery.facebox('some html') 32 | * jQuery.facebox('some html', 'my-groovy-style') 33 | * 34 | * The above will open a facebox with "some html" as the content. 35 | * 36 | * jQuery.facebox(function($) { 37 | * $.get('blah.html', function(data) { $.facebox(data) }) 38 | * }) 39 | * 40 | * The above will show a loading screen before the passed function is called, 41 | * allowing for a better ajaxy experience. 42 | * 43 | * The facebox function can also display an ajax page, an image, or the contents of a div: 44 | * 45 | * jQuery.facebox({ ajax: 'remote.html' }) 46 | * jQuery.facebox({ ajax: 'remote.html' }, 'my-groovy-style') 47 | * jQuery.facebox({ image: 'stairs.jpg' }) 48 | * jQuery.facebox({ image: 'stairs.jpg' }, 'my-groovy-style') 49 | * jQuery.facebox({ div: '#box' }) 50 | * jQuery.facebox({ div: '#box' }, 'my-groovy-style') 51 | * 52 | * Want to close the facebox? Trigger the 'close.facebox' document event: 53 | * 54 | * jQuery(document).trigger('close.facebox') 55 | * 56 | * Facebox also has a bunch of other hooks: 57 | * 58 | * loading.facebox 59 | * beforeReveal.facebox 60 | * reveal.facebox (aliased as 'afterReveal.facebox') 61 | * init.facebox 62 | * 63 | * Simply bind a function to any of these hooks: 64 | * 65 | * $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... }) 66 | * 67 | */ 68 | (function($) { 69 | $.facebox = function(data, klass) { 70 | $.facebox.loading() 71 | 72 | if (data.ajax) fillFaceboxFromAjax(data.ajax, klass) 73 | else if (data.image) fillFaceboxFromImage(data.image, klass) 74 | else if (data.div) fillFaceboxFromHref(data.div, klass) 75 | else if ($.isFunction(data)) data.call($) 76 | else $.facebox.reveal(data, klass) 77 | } 78 | 79 | /* 80 | * Public, $.facebox methods 81 | */ 82 | 83 | $.extend($.facebox, { 84 | settings: { 85 | opacity : 0, 86 | overlay : true, 87 | loadingImage : '/facebox/loading.gif', 88 | closeImage : '/facebox/closelabel.gif', 89 | imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ], 90 | faceboxHtml : '\ 91 | ' 118 | }, 119 | 120 | loading: function() { 121 | init() 122 | if ($('#facebox .loading').length == 1) return true 123 | showOverlay() 124 | 125 | $('#facebox .content').empty() 126 | $('#facebox .body').children().hide().end(). 127 | append('