{"action":"created","issue":{"url":"https://api.github.com/repos/zslayton/stomp-rs/issues/52","labels_url":"https://api.github.com/repos/zslayton/stomp-rs/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/zslayton/stomp-rs/issues/52/comments","events_url":"https://api.github.com/repos/zslayton/stomp-rs/issues/52/events","html_url":"https://github.com/zslayton/stomp-rs/issues/52","id":55399928,"number":52,"title":"Create an `encode_headers!` macro","user":{"login":"zslayton","id":611616,"avatar_url":"https://avatars.githubusercontent.com/u/611616?v=3","gravatar_id":"","url":"https://api.github.com/users/zslayton","html_url":"https://github.com/zslayton","followers_url":"https://api.github.com/users/zslayton/followers","following_url":"https://api.github.com/users/zslayton/following{/other_user}","gists_url":"https://api.github.com/users/zslayton/gists{/gist_id}","starred_url":"https://api.github.com/users/zslayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zslayton/subscriptions","organizations_url":"https://api.github.com/users/zslayton/orgs","repos_url":"https://api.github.com/users/zslayton/repos","events_url":"https://api.github.com/users/zslayton/events{/privacy}","received_events_url":"https://api.github.com/users/zslayton/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-25T06:03:18Z","updated_at":"2015-01-27T21:24:49Z","closed_at":"2015-01-27T21:24:49Z","body":"@fribeiro1 was kind enough to make a macro for putting together a HeaderList. It's a relatively low-level one, however, in that it avoids doing any encoding for the developer in case that's not what (s)he wants. This is not necessarily the most common use case. It would be nice to have an `encode_headers!` macro which expects tuples of `(key: &str, value: &str)` and invokes `Header::encode_key_value` on each.\r\n\r\ne.g.\r\n```rust\r\nlet headers = encode_headers![\r\n  (\"accept-version\", \"1.2\"),\r\n  (\"heart-beat\", \"0,0\"),\r\n  (\"content-length\", \"0\")\r\n];\r\n```"},"comment":{"url":"https://api.github.com/repos/zslayton/stomp-rs/issues/comments/71730994","html_url":"https://github.com/zslayton/stomp-rs/issues/52#issuecomment-71730994","issue_url":"https://api.github.com/repos/zslayton/stomp-rs/issues/52","id":71730994,"user":{"login":"zslayton","id":611616,"avatar_url":"https://avatars.githubusercontent.com/u/611616?v=3","gravatar_id":"","url":"https://api.github.com/users/zslayton","html_url":"https://github.com/zslayton","followers_url":"https://api.github.com/users/zslayton/followers","following_url":"https://api.github.com/users/zslayton/following{/other_user}","gists_url":"https://api.github.com/users/zslayton/gists{/gist_id}","starred_url":"https://api.github.com/users/zslayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zslayton/subscriptions","organizations_url":"https://api.github.com/users/zslayton/orgs","repos_url":"https://api.github.com/users/zslayton/repos","events_url":"https://api.github.com/users/zslayton/events{/privacy}","received_events_url":"https://api.github.com/users/zslayton/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T21:24:49Z","updated_at":"2015-01-27T21:24:49Z","body":"This has been added and will be included in v0.6.0. It was included as an overloaded version of `header_list!`, with keys and values separated by `=>`. e.g.\r\n\r\n```rust\r\nlet headers = header_list![\r\n  \"key1\" => \"value1\",\r\n  \"key2\" => \"value2\",\r\n  \"key3\" => \"value3\"\r\n]\r\n```"}}