{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/HDF5.jl/issues/296","repository_url":"https://api.github.com/repos/JuliaLang/HDF5.jl","labels_url":"https://api.github.com/repos/JuliaLang/HDF5.jl/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/HDF5.jl/issues/296/comments","events_url":"https://api.github.com/repos/JuliaLang/HDF5.jl/issues/296/events","html_url":"https://github.com/JuliaLang/HDF5.jl/issues/296","id":149494663,"number":296,"title":"Store a Requests.Response to HDF5","user":{"login":"femtotrader","id":5049737,"avatar_url":"https://avatars.githubusercontent.com/u/5049737?v=3","gravatar_id":"","url":"https://api.github.com/users/femtotrader","html_url":"https://github.com/femtotrader","followers_url":"https://api.github.com/users/femtotrader/followers","following_url":"https://api.github.com/users/femtotrader/following{/other_user}","gists_url":"https://api.github.com/users/femtotrader/gists{/gist_id}","starred_url":"https://api.github.com/users/femtotrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/femtotrader/subscriptions","organizations_url":"https://api.github.com/users/femtotrader/orgs","repos_url":"https://api.github.com/users/femtotrader/repos","events_url":"https://api.github.com/users/femtotrader/events{/privacy}","received_events_url":"https://api.github.com/users/femtotrader/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-19T15:24:18Z","updated_at":"2016-04-19T16:07:22Z","closed_at":"2016-04-19T15:55:45Z","body":"Hello,\r\n\r\nI'm new to Julia. I'm a Python dev.\r\nI'd like to be able to make a sort of cache mechanism of HTTP requests like [requests-cache](http://requests-cache.readthedocs.org/) \r\n\r\nsee https://github.com/JuliaWeb/Requests.jl/issues/101\r\n\r\nIdeally storing response to any kind of database (SQLite, MySQL, PostgreSQL...) will be nice but I haven't find an ORM like SQLAlchemy for Julia...\r\n\r\nrequests-cache is serializing response using [pickle](https://docs.python.org/3/library/pickle.html)\r\n\r\nSo I have been looking at serialization and Julia and found this SO question\r\nhttp://stackoverflow.com/questions/24958248/julia-how-stable-are-serialize-deserialize\r\n\r\nAn answer point to https://github.com/JuliaLang/HDF5.jl so I'm trying HDF5.jl\r\n\r\nHere is my code:\r\n\r\n```\r\nusing Requests\r\nusing HDF5\r\nresp = get(\"http://httpbin.org/get\")\r\nkey = string(resp.request.value.uri)\r\nh5open(\"cache.h5\", \"w\") do file\r\n    write(file, key, resp)\r\nend\r\n```\r\n\r\nbut it raises\r\n\r\n```\r\nERROR: MethodError: `write` has no method matching write(::HDF5.HDF5File, ::ASCIIString, ::HttpCommon.Response)WARNING: Error showing method candidates, aborted\r\n```\r\n\r\nAny idea ?\r\n\r\nKind regards\r\n\r\nPS: please excuse my newbie question!"},"comment":{"url":"https://api.github.com/repos/JuliaLang/HDF5.jl/issues/comments/211997582","html_url":"https://github.com/JuliaLang/HDF5.jl/issues/296#issuecomment-211997582","issue_url":"https://api.github.com/repos/JuliaLang/HDF5.jl/issues/296","id":211997582,"user":{"login":"femtotrader","id":5049737,"avatar_url":"https://avatars.githubusercontent.com/u/5049737?v=3","gravatar_id":"","url":"https://api.github.com/users/femtotrader","html_url":"https://github.com/femtotrader","followers_url":"https://api.github.com/users/femtotrader/followers","following_url":"https://api.github.com/users/femtotrader/following{/other_user}","gists_url":"https://api.github.com/users/femtotrader/gists{/gist_id}","starred_url":"https://api.github.com/users/femtotrader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/femtotrader/subscriptions","organizations_url":"https://api.github.com/users/femtotrader/orgs","repos_url":"https://api.github.com/users/femtotrader/repos","events_url":"https://api.github.com/users/femtotrader/events{/privacy}","received_events_url":"https://api.github.com/users/femtotrader/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T16:07:22Z","updated_at":"2016-04-19T16:07:22Z","body":"I did\r\n\r\n```\r\nusing Requests\r\nusing JLD\r\nresp = get(\"http://httpbin.org/get\")\r\nkey = string(resp.request.value.uri)\r\njldopen(\"cache.jld\", \"w\") do file\r\n    write(file, key, resp)  # alternatively, say \"@write file A\"\r\nend\r\n\r\n\r\nretrieved_resp = jldopen(\"cache.jld\", \"r\") do file\r\n    read(file, key)\r\nend\r\n```\r\n\r\nit works fine...\r\nbut the path is still long to make a Requests-cache.jl library\r\n\r\nIf you know some people who could be interested in working on such a project please ping them...\r\n\r\nPinging some people for JuliaWeb: @malmaud @jrevels @MikeInnes @sbromberger @WestleyArgentum"}}