Skip to content

Instantly share code, notes, and snippets.

@chewbranca
Created April 20, 2011 03:19
Show Gist options
  • Save chewbranca/930275 to your computer and use it in GitHub Desktop.
Save chewbranca/930275 to your computer and use it in GitHub Desktop.
$ lein repl
"REPL started; server listening on localhost:9592."
user=> (require '[clj-http.client :as client])
nil
user=> (client/get "http://api.stackoverflow.com/1.1/questions/5700021")
{:status 200, :headers {"content-encoding" "gzip", "content-type" "application/json; charset=utf-8", "date" "Wed, 20 Apr 2011 02:57:40 GMT", "x-aspnetmvc-version" "3.0", "cache-control" "private", "x-ratelimit-current" "286", "content-length" "586", "x-ratelimit-max" "300", "connection" "close", "x-aspnet-version" "4.0.30319"}, :body "�\b �`I�%&/m�{J�J��t�\b�`$ؐ@������iG#)�*��eVe]f@�흼��{���{���;�N'���?\\fdl��J�ɞ!���?~|?\"~�o���Gm�f�G������.���>��#�u޴E�l���4�����
�s�hZV?���F�geѬ���bQ-��s���m���es�׿��Z/[��|3��6���ڤ�������V��eUmn!���x~��X�e���u\rz|t׎�. ����5M��u\f!_�͆�M�������E�e;jj羮��yM_���֍!��Ý��=��z�����/����|LԌf�̮�e��f?��dE4��պ̀������|���?Ϛ9���A>}xp�{0{p>�����ٽ�;�����{�~��Z��{;�vw�������gE:8���(���e�^w�^�����<��W3�q���e�_9�����L��y����a�γ��]��hK&�tV�Mz����i���y�V�\b��M�9L�匾��f�9Q��i~��/������/I�� ������ "}
user=>
$ curl -X GET "http://api.stackoverflow.com/1.1/questions/5700021"
`I�%&/mJ�Jt�`$ؐ@��iG#)�*�Ve]f@����;�N'�?\fdl��!��?~|?"~��m����>��#��u޴E�l���
z|t׎5Mu �hZV?��eѬ��Q-��s�m�es�׿��Z/[��|3����ڤ���VeUmn!~��X��u
!_�͆������E;jj羮��yM_��!Ý��=���z����|LԌf�̮�e�?��dE4��̀����?Ϛ9>}xp�{0{p>���ٽ�;���{�~�{;�vw�̚��E:8���w�^�����3�q����_9�����y����a�γ���hK&����tVzi���yM�9L�匾�Q��i~��I����o�o%
$ curl -X GET "http://api.stackoverflow.com/1.1/questions/5700021" | gunzip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
117 587 117 587 0 0 1576 0 --:--:-- --:--:-- --:--:-- 4585
{
"total": 1,
"page": 1,
"pagesize": 30,
"questions": [
{
"tags": [
"clojure",
"lisp",
"common-lisp"
],
"answer_count": 1,
"accepted_answer_id": 5700888,
"favorite_count": 0,
"question_timeline_url": "/questions/5700021/timeline",
"question_comments_url": "/questions/5700021/comments",
"question_answers_url": "/questions/5700021/answers",
"question_id": 5700021,
"owner": {
"user_id": 190822,
"user_type": "registered",
"display_name": "Zubair",
"reputation": 3772,
"email_hash": "67ec98818d7fb6395d9a327081cd5472"
},
"creation_date": 1303113388,
"last_edit_date": 1303118826,
"last_activity_date": 1303118840,
"up_vote_count": 5,
"down_vote_count": 0,
"view_count": 139,
"score": 5,
"community_owned": false,
"title": "How does CLOS relate to Clojure's type and record features?"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment