se 5.020;
use feature 'signatures';
no warnings 'experimental::signatures';
use Carp 'croak';
use JSON;
use PerlX::Maybe;
use HTTP::Request::CurlParameters;
=head1 NAME
HTTP::Request::FromFetch - tu
$+{options};
my $u = $+{uri};
if( defined $o and $o =~ /\S/ ) {
$options = decode_json($o);
} else {
$options = {};
};
$options->{uri} = $u;
$options->{method}
,
'header|H=s@',
'include|i', # ignored
'interface=s',
'insecure|k',
'json=s@',
'location|L', # ignored, we always follow redirects
'max-filesize=s',
'ma
[] };
my @post_binary_data = @{ $options->{'data-binary'} || [] };
my @post_json_data = @{ $options->{'json'} || [] };
my @form_args;
if( $options->{form}) {
# support --form
} @post_binary_data;
@post_json_data = map {
$self->_maybe_read_data_file( $build_options{ read_files }, $_ );
} @post_json_data;
@post_read_data = map {
'https://example.com',
);
=item *
C<headers>
headers => {
'Content-Type' => 'text/json',
'X-Secret' => ['value-1', 'value-2'],
}
The headers of the request. Multiple heade
}
} elsif( defined( my $body = $self->body )) {
# Can we collapse stuff into --json or other nicer representations
# here ?!
push @request_commands,
'--d