Procházet zdrojové kódy

move to correct path

nas před 2 roky
rodič
revize
19e1e894ae
2 změnil soubory, kde provedl 0 přidání a 41 odebrání
  1. 0
    6
      test/test.cfg.sample
  2. 0
    35
      test/test.pl

+ 0
- 6
test/test.cfg.sample Zobrazit soubor

@@ -1,6 +0,0 @@
1
-[Authentification]
2
-Protocol : https
3
-Host : localhost
4
-Path : api/v1/ 
5
-Username : test_remote
6
-Password : NJfccjabWSXqmpTRhfXRs6Re2CAIsJyhz3TAo4rpWz2nlMgWqTScmbsXoIlwdHB1

+ 0
- 35
test/test.pl Zobrazit soubor

@@ -1,35 +0,0 @@
1
-#!/usr/bin/perl
2
-# @file journal.pl
3
-# @author nas
4
-# @date 31/01/2022
5
-# @brief Remote call to the API in order to test
6
-
7
-use Config::Std;
8
-use LWP::UserAgent ();
9
-
10
-read_config 'test.cfg' => my %config; 
11
-print "Username : $config{Authentification}{Username}\n";
12
-print "Host : $config{Authentification}{Host}\n";
13
-print "Host : $config{Authentification}{Path}\n";
14
-print "Protocol : $config{Authentification}{Username}\n";
15
-
16
-local $url = "$config{Authentification}{Host}$config{Authentification}{Path}";
17
-local $ua = LWP::UserAgent->new(timeout => 10);
18
-$ua->env_proxy;
19
-
20
-sub rq {
21
-  my $path = (exists $_[0])? $_[0] : "";
22
-  my $response = $ua->get( "$url$path" );
23
-  print "rq $url$path\n";
24
-  if ($response->is_success) {
25
-    print $response->decoded_content;
26
-    print "\n";
27
-  }
28
-  else {
29
-    print $response->status_line;
30
-    print "\n";
31
-  }
32
-}
33
-
34
-rq();
35
-rq( "tokens" );

Loading…
Zrušit
Uložit