We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be18a9e commit 962bebaCopy full SHA for 962beba
lib/Github/Api/Issue.php
@@ -18,6 +18,22 @@
18
*/
19
class Issue extends AbstractApi
20
{
21
+ use AcceptHeaderTrait;
22
+
23
+ /**
24
+ * Configure the body type.
25
+ *
26
+ * @link https://developer.github.com/v3/issues/#custom-media-types
27
+ * @param string|null $bodyType
28
+ */
29
+ public function configure($bodyType = null)
30
+ {
31
+ if (!in_array($bodyType, array('text', 'html', 'full'))) {
32
+ $bodyType = 'raw';
33
+ }
34
+ $this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $this->client->getApiVersion(), $bodyType);
35
36
37
/**
38
* List issues by username, repo and state.
39
*
0 commit comments