File Coverage

blib/lib/cPanel/APIClient/Utils/HTTPRequest.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             package cPanel::APIClient::Utils::HTTPRequest;
2              
3             # Copyright 2020 cPanel, L. L. C.
4             # All rights reserved.
5             # http://cpanel.net
6             #
7             # This is free software; you can redistribute it and/or modify it under the
8             # same terms as Perl itself. See L.
9              
10 2     2   12 use strict;
  2         5  
  2         58  
11 2     2   10 use warnings;
  2         5  
  2         72  
12              
13 2     2   14 use URI::Escape ();
  2         4  
  2         30  
14              
15 2     2   838 use cPanel::APIClient::Utils::FormArray ();
  2         6  
  2         138  
16              
17             sub encode_form {
18 7     7 0 19 my ($args_hr) = @_;
19              
20 7         27 my @pieces = cPanel::APIClient::Utils::FormArray::to_kv_equals_strings($args_hr);
21              
22 7         58 return join( '&', @pieces );
23             }
24              
25             1;