Skip to content

Commit 8a6dc75

Browse files
committed
✨ added content xml shortcut
1 parent 336754c commit 8a6dc75

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Headers.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ public static function contentHtml($code = 200): void
110110
self::set("Content-Type", "text/html", true, $code ?? self::$httpCode);
111111
}
112112

113+
/**
114+
* Set the content-type to xml
115+
*/
116+
public static function contentXml($code = 200): void
117+
{
118+
self::set("Content-Type", "application/xml", true, $code ?? self::$httpCode);
119+
}
120+
113121
/**
114122
* Set the content-type to json
115123
*/

0 commit comments

Comments
 (0)