HTTP-Promise
view release on metacpan or search on metacpan
lib/HTTP/Promise/Headers.pm view on Meta::CPAN
See L<rfc7231, section 3.1.4.2|https://tools.ietf.org/html/rfc7231#section-3.1.4.2> and L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Location>
=head2 content_range
# Content-Range: bytes 200-1000/67589
# Unsatisfiable range value
# Content-Range: bytes */1234
Sets or gets the C<Content-Range> header field value. It takes a string value.
See also L<HTTP::Promise::Headers::ContentRange> to have a more granular control.
See L<rfc7233, section 4.2|https://tools.ietf.org/html/rfc7233#section-4.2> and L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range>
=head2 content_security_policy
# Content-Security-Policy: default-src 'self' http://example.com;
# connect-src 'none';
# Content-Security-Policy: connect-src http://example.com/;
# script-src http://example.com/
Sets or gets the C<Content-Security-Policy> header field value. It takes a string value.
See also L<HTTP::Promise::Headers::ContentSecurityPolicy> to have a more granular control.
See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy>
=head2 content_security_policy_report_only
# Content-Security-Policy-Report-Only: default-src https:; report-uri /csp-violation-report-endpoint/
Sets or gets the C<Content-Security-Policy-Report-Only> header field value. It takes a string value of properly formatted header value.
See also L<HTTP::Promise::Headers::ContentSecurityPolicyReportOnly> to have a more granular control.
=head2 content_type
This sets or gets the C<Content-Type> header value. It takes a string value.
If a value is provided, this will set the header value. If no value is provided, this simply return the header field value.
See also L<HTTP::Promise::Headers::ContentType> to have a more granular control.
See also L<rfc7233, section 4.1|https://tools.ietf.org/html/rfc7233#section-4.1>, L<rfc7231, section 3.1.1.5|https://tools.ietf.org/html/rfc7231#section-3.1.1.5> and L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...
=head2 cross_origin_embedder_policy
# Cross-Origin-Embedder-Policy: require-corp
# Cross-Origin-Opener-Policy: same-origin
This sets or gets the C<Cross-Origin-Embedder-Policy> header value. It takes a string value.
It can have either of the following value: C<require-corp> or C<same-origin>
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy>
=head2 cross_origin_opener_policy
# Cross-Origin-Opener-Policy: unsafe-none
# Cross-Origin-Opener-Policy: same-origin-allow-popups
# Cross-Origin-Opener-Policy: same-origin
This sets or gets the C<Cross-Origin-Opener-Policy> header value. It takes a string value.
It can have either of the following value: C<unsafe-none> or C<same-origin-allow-popups> or C<same-origin>
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy>
=head2 cross_origin_resource_policy
This sets or gets the C<Cross-Origin-Resource-Policy> header value. It takes a string value.
It can have either of the following value: C<same-site> or C<same-origin> or C<same-origin>
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy>
For more example: L<https://resourcepolicy.fyi/>
=head2 cspro
This is an alias for L</content_security_policy_report_only>
=head2 date
This sets or gets the C<Date> header value. It takes a date string value, a unix timestamp or a L<DateTime::Lite> value, or a L<DateTime> value.
If no value is provided, it returns the current value of the C<Date> header field as a L<DateTime::Lite> object.
=head2 device_memory
# Device-Memory: 1
This sets or gets the C<Device-Memory> header value. It takes a number.
L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Device-Memory>
=head2 digest
# Digest: sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=
# Digest: sha-256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=,unixsum=30637
This sets or gets the C<Digest> header value. It takes either a string or an array or array reference of properly formatted values.
See L<draft rfc|https://tools.ietf.org/html/draft-ietf-httpbis-digest-headers-05#section-3> and L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Digest>
=head2 dnt
# DNT: 0
# DNT: 1
# DNT: null
This sets or gets the C<DNT> header value. It takes a string value.
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/DNT>
=head2 early_data
# Early-Data: 1
This sets or gets the C<Early-Data> header value. It takes a string value.
See also L<rfc8470, section 5.1|https://tools.ietf.org/html/rfc8470#section-5.1> and L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Early-Data>
=head2 etag
( run in 0.832 second using v1.01-cache-2.11-cpan-364913b4093 )