Title: Dealing With Other Media Types · Issue #42 · codegram/hyperclient · GitHub
Open Graph Title: Dealing With Other Media Types · Issue #42 · codegram/hyperclient
X Title: Dealing With Other Media Types · Issue #42 · codegram/hyperclient
Description: Imagine I get some HAL from a server that looks like this (in part, maybe): { '_links': { 'self': { 'href': '/users/12345' }, 'profile_image': { 'href': '/user/12345/face' } } } And I am super interested in profile images, so I want to g...
Open Graph Description: Imagine I get some HAL from a server that looks like this (in part, maybe): { '_links': { 'self': { 'href': '/users/12345' }, 'profile_image': { 'href': '/user/12345/face' } } } And I am super inte...
X Description: Imagine I get some HAL from a server that looks like this (in part, maybe): { '_links': { 'self': { 'href': '/users/12345' }, 'profile_image': { 'href...
Opengraph URL: https://github.com/codegram/hyperclient/issues/42
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dealing With Other Media Types","articleBody":"Imagine I get some HAL from a server that looks like this (in part, maybe):\n\n```\n{\n '_links': {\n 'self': { 'href': '/users/12345' },\n 'profile_image': { 'href': '/user/12345/face' }\n }\n}\n```\n\nAnd I am super interested in profile images, so I want to get that sucker. Right now, if I call, you know, `user.links.profile_image.resource` I get back a sort of confused `Hyperclient::Resource` that can't tell me the media type is jpeg or whatever. I could call `get` instead of `resource`, but then I have to know more about the foreign API.\n\nI wonder if we shouldn't make it so that Hyperclient, when it sees a response from a server that isn't `Content-Type: application/hal+json` (or maybe a list to include normal `application/json` and that a user could add to), it just hands over the `Faraday::Response` object or something similar. Basically, it punts and says, \"This isn't hypermedia I know about, you handle this bullshit.\"\n\nThoughts?\n","author":{"url":"https://github.com/benhamill","@type":"Person","name":"benhamill"},"datePublished":"2013-10-15T21:00:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/42/hyperclient/issues/42"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a97a03c5-b60d-545c-ebd9-7bb9cfa4a04d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EE0E:3AB520:2053AE3:2B3E590:697832AC |
| html-safe-nonce | ce30cb7037d0f7e9f6ef43fc66ff9d98a108ce623bfd5e711c5da533d2df7bb6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTBFOjNBQjUyMDoyMDUzQUUzOjJCM0U1OTA6Njk3ODMyQUMiLCJ2aXNpdG9yX2lkIjoiMzA1MjQ1Nzg0MzQyOTQ4NzI3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7b9c77043b944943e216470bc39725ea5407cea5aba4c9890478b3ea18dc53f5 |
| hovercard-subject-tag | issue:21044194 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codegram/hyperclient/42/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1e1b8385b8f57ee49412bbe8da252c2bd31d99eea9748d7c540392946f2e67a/codegram/hyperclient/issues/42 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1e1b8385b8f57ee49412bbe8da252c2bd31d99eea9748d7c540392946f2e67a/codegram/hyperclient/issues/42 |
| og:image:alt | Imagine I get some HAL from a server that looks like this (in part, maybe): { '_links': { 'self': { 'href': '/users/12345' }, 'profile_image': { 'href': '/user/12345/face' } } } And I am super inte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | benhamill |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/codegram/hyperclient git https://github.com/codegram/hyperclient.git |
| octolytics-dimension-user_id | 82056 |
| octolytics-dimension-user_login | codegram |
| octolytics-dimension-repository_id | 3877860 |
| octolytics-dimension-repository_nwo | codegram/hyperclient |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3877860 |
| octolytics-dimension-repository_network_root_nwo | codegram/hyperclient |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8cc3e064910e26648760f573a358cfc07c97b42c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width