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   14 use strict;
  2         6  
  2         67  
11 2     2   12 use warnings;
  2         3  
  2         72  
12              
13 2     2   13 use URI::Escape ();
  2         4  
  2         29  
14              
15 2     2   883 use cPanel::APIClient::Utils::FormArray ();
  2         5  
  2         133  
16              
17             sub encode_form {
18 7     7 0 16 my ($args_hr) = @_;
19              
20 7         28 my @pieces = cPanel::APIClient::Utils::FormArray::to_kv_equals_strings($args_hr);
21              
22 7         61 return join( '&', @pieces );
23             }
24              
25             1;