Subiendo proyecto completo sin restricciones de git ignore

This commit is contained in:
Jose Sanchez
2023-08-17 11:44:02 -04:00
parent a0d4f5ba3b
commit 20f1c60600
19921 changed files with 2509159 additions and 45 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace Twilio\Http;
class Response {
protected $headers;
protected $content;
protected $statusCode;
public function __construct(int $statusCode, ?string $content, ?array $headers = []) {
$this->statusCode = $statusCode;
$this->content = $content;
$this->headers = $headers;
}
/**
* @return mixed
*/
public function getContent() {
return \json_decode($this->content, true);
}
public function getStatusCode(): int {
return $this->statusCode;
}
public function getHeaders(): array {
return $this->headers;
}
public function ok(): bool {
return $this->getStatusCode() < 400;
}
public function __toString(): string {
return '[Response] HTTP ' . $this->getStatusCode() . ' ' . $this->content;
}
}