| 1 | package Kubernetes::REST::HTTPResponse; | ||
| 2 | our $VERSION = '1.109'; | ||
| 3 | # ABSTRACT: HTTP response object | ||
| 4 | use Moo; | ||
| 5 | use Types::Standard qw/Str Int/; | ||
| 6 | |||
| 7 | |||
| 8 | has content => (is => 'ro', isa => Str); | ||
| 9 | |||
| 10 | |||
| 11 | has status => (is => 'ro', isa => Int); | ||
| 12 | |||
| 13 | |||
| 14 | 1; | ||
| 15 | |||
| 16 | __END__ | ||
| 17 | |||
| 18 | =pod | ||
| 19 | |||
| 20 | =encoding UTF-8 | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Kubernetes::REST::HTTPResponse - HTTP response object | ||
| 25 | |||
| 26 | =head1 VERSION | ||
| 27 | |||
| 28 | version 1.109 | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | use Kubernetes::REST::HTTPResponse; | ||
| 33 | |||
| 34 | my $res = Kubernetes::REST::HTTPResponse->new( | ||
| 35 | status => 200, | ||
| 36 | content => '{"items":[]}', | ||
| 37 | ); | ||
| 38 | |||
| 39 | =head1 DESCRIPTION | ||
| 40 | |||
| 41 | Internal HTTP response object used by L<Kubernetes::REST>. | ||
| 42 | |||
| 43 | =head2 content | ||
| 44 | |||
| 45 | The response body content, as bytes: an IO backend must undo | ||
| 46 | C<Content-Encoding> (e.g. gzip) but leave the charset alone, and never decode | ||
| 47 | it itself. See L<Kubernetes::REST::Role::IO/Encoding contract>. | ||
| 48 | |||
| 49 | =head2 status | ||
| 50 | |||
| 51 | The HTTP status code (e.g., 200, 404, 500). | ||
| 52 | |||
| 53 | =head1 SEE ALSO | ||
| 54 | |||
| 55 | =over | ||
| 56 | |||
| 57 | =item * L<Kubernetes::REST> - Main API client | ||
| 58 | |||
| 59 | =item * L<Kubernetes::REST::HTTPRequest> - Request object | ||
| 60 | |||
| 61 | =item * L<Kubernetes::REST::Role::IO> - IO interface | ||
| 62 | |||
| 63 | =back | ||
| 64 | |||
| 65 | =head1 SUPPORT | ||
| 66 | |||
| 67 | =head2 Issues | ||
| 68 | |||
| 69 | Please report bugs and feature requests on GitHub at | ||
| 70 | L<https://github.com/pplu/kubernetes-rest/issues>. | ||
| 71 | |||
| 72 | =head2 IRC | ||
| 73 | |||
| 74 | Join C<#kubernetes> on C<irc.perl.org> or message Getty directly. | ||
| 75 | |||
| 76 | =head1 CONTRIBUTING | ||
| 77 | |||
| 78 | Contributions are welcome! Please fork the repository and submit a pull request. | ||
| 79 | |||
| 80 | =head1 AUTHORS | ||
| 81 | |||
| 82 | =over 4 | ||
| 83 | |||
| 84 | =item * | ||
| 85 | |||
| 86 | Torsten Raudssus <getty@cpan.org> | ||
| 87 | |||
| 88 | =item * | ||
| 89 | |||
| 90 | Jose Luis Martinez Torres <jlmartin@cpan.org> | ||
| 91 | |||
| 92 | =back | ||
| 93 | |||
| 94 | =head1 COPYRIGHT AND LICENSE | ||
| 95 | |||
| 96 | This software is Copyright (c) 2019-2026 by Jose Luis Martinez Torres <jlmartin@cpan.org>. | ||
| 97 | |||
| 98 | This is free software, licensed under: | ||
| 99 | |||
| 100 | The Apache License, Version 2.0, January 2004 | ||
| 101 | |||
| 102 | =cut |