24 lines
483 B
PHP
24 lines
483 B
PHP
<?php
|
|
|
|
namespace Ulmus\Api\Common;
|
|
|
|
enum ContentTypeEnum : string
|
|
{
|
|
case Json = "application/json";
|
|
case Xml = "application/xml";
|
|
case RssXml = "application/rss+xml";
|
|
case UrlEncoded = "application/x-www-form-urlencoded";
|
|
case Multipart = "multipart/form-data";
|
|
|
|
public function defaultBody() : string
|
|
{
|
|
switch($this) {
|
|
case static::Json:
|
|
return "{}";
|
|
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
}
|