| 1 | package WebAPI::HTTP::Throwable::Role::JSONBody; | ||
| 2 | 4 | $WebAPI::HTTP::Throwable::Role::JSONBody::VERSION = '0.004002'; | |
| 3 | 4 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 18 | ▶ | sub body { return shift->message } |
|
Subroutine
body: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 6 | |||
| 7 | 9 | ▶ | sub body_headers { |
|
Subroutine
body_headers: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 8 | 9 | my ($self, $body) = @_; | |
| 9 | |||
| 10 | return [ | ||
| 11 | 9 | 'Content-Type' => 'application/json', | |
| 12 | 'Content-Length' => length $body, | ||
| 13 | ]; | ||
| 14 | } | ||
| 15 | |||
| 16 | 9 | ▶ | sub as_string { return shift->body } |
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | |||
| 18 | 4 | 1; | |
| 19 | |||
| 20 | __END__ | ||