http-request-class-v2

Gesponsorde koppelingen

PHP script bestanden

  1. http-request-class-v2

« Lees de omschrijving en reacties

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
<?php
/**
 * A class to send very easy an HTTP request.
 *
 * With this class, you can easily send an HTTP request to a given url. Just
 * give the url and, if necessary, an array with arguments and the port.
 * With another function you send the request, and finaly, you can recieve the
 * respons with a last function.
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 2.0-augustus 2008
 * @acces public
 */

class httpRequest {
    /* ########## The variables ########## */
    /* ################################### */
    
    /**
     * @var string The variable that contains the given url, excepted 'http://'.
     */

    protected $strUrl;
    /**
     * @var string The variable that contains the host, stripped from the givin url.
     */

    protected $strHost;
    /**
     * @var string The variable that contains the path to the file, stripped from the given url.
     */

    protected $strPath;
    /**
     * @var int The variable that contains the port of the connection.
     */

    protected $intPort;
    /**
     * @var string The variable that tells which protocol will be used.
     */

    protected $strProtocol;
    
    
    /**
     * @var resource The variable that contains the resource opened by fsockopen.
     */

    protected $resFilePointer;
    
    
    /**
     * @var object The variable that contains an object of httpHeaders.
     */

    public $headers;
    
    /**
     * @var object The variable that contains an object of httpArguments.
     */

    public $arguments;
    
    /**
     * @var object The variable that contains an object of httpResponse.
     */

    public $response;
    
    /* ########## The public functions ########## */
    /* ########################################## */
    
    /**
     * @desc Constructor.
     *
     * @param string URL to the script where the request will be send to.
     * @param string [optional] The protocol which will be used.
     * @param int [optional] The port which will be used for connecting. Default: 80.
     *
     * @return bool
     */

    public function __construct($strUrl, $strProtocol="post", $intPort=80) {
        // Check the parameters.
        if (!is_string($strUrl)) {
            throw new HttpParameterException("\$strUrl must be a string", __METHOD__);
        }

        if (!is_string($strProtocol)) {
            throw new HttpParameterException("\$strProtocol must be a string", __METHOD__);
        }

        if (!is_int($intPort)) {
            throw new HttpParameterException("\$intPort must be an integer", __METHOD__);
        }

        
        // Process the url and put it in a private variable.
        $this->processUrl($strUrl);
        
        // Process the port and put it in a private variable.
        $this->processPort($intPort);
        
        // Process the protocol and put it in a private variable.
        $this->processProtocol($strProtocol);
        
        // Prepare the headers.
        $this->headers = new httpHeaders();
        
        // Prepare the arguments.
        $this->arguments = new httpArguments();
        
        return true;
    }

    
    /**
     * @desc Destructor. Closes the connection if it's still open.
     *
     * @return bool
     */

    public function __destruct() {
        if ($this->resFilePointer) {
            if (!fclose($this->resFilePointer)) {
                throw new HttpConnectionException ("cannot close the connection");
            }
        }

        
        return true;
    }

    
    /**
     * @desc The function that opens the connection and sends the arguments.
     *
     * @param int [optional] The connection timeout, in secconds. Default: 30.
     *
     * @return object
     */

    public function execute($intTimeout = 30) {
        // Checks the parameter
        if (!is_int($intTimeout)) {
            throw new HttpParameterException("\$intTimeout must be an integer", __METHOD__);
        }

        
        // Add the default headers.
        // Tell what protocol will be used for the request, and to which path.

        $this->headers->add($this->strProtocol." ".$this->strPath." HTTP/1.1");
        // Tell which content type it is.
        $this->headers->add("Content-Type: application/x-www-form-urlencoded");
        // Tell the length of the string with arguments.
        $this->headers->add("Content-Length: ".$this->arguments->length());
        // Tell that the connection must be closed afterwards.
        $this->headers->add("Connection: Close");
        
        // Open the connection.
        $this->resFilePointer = fsockopen($this->strHost, $this->intPort, $intErrNumber, $strErrMessage, $intTimeout);
        if (!$this->resFilePointer) {
            $strErrMessage = (empty($strErrMessage)) ? "probably wrong hostname" : $strErrMessage;
            throw new HttpConnectionException ($strErrMessage);
        }

        // Send the header.
        if (fputs($this->resFilePointer, $this->headers) === false) {
            throw new HttpConnectionException ("cannot send header");
        }

        // Send the arguments.
        if (fputs($this->resFilePointer, $this->arguments) === false) {
            throw new HttpConnectionException ("cannot send arguments");
        }

        
        // Get the response and put it in object
        $this->getResponse();
        
        return $this->response;
    }

    
    
    /* ########## The protected functions ########## */
    /* ############################################# */
    
    /**
     * @desc The function that processes the url and put it in a private variable.
     *
     * @param string URL to the script where the request will be send to.
     *
     * @return bool
     */

    protected function processUrl($strUrl) {
        // Checks the parameter.
        if (!is_string($strUrl)) {
            throw new HttpParameterException("\$strUrl must be a string", __METHOD__);
        }

        
        // Removes 'http://' from the url.
        if (substr($strUrl, 0, 7) == "http://") {
            $strUrl = substr($strUrl, 7);
        }

        
        // Retrieves the host and path from the url.
        list($strHost, $strPath) = explode("/", $strUrl, 2);
        
        // Add a slash in front of the path.
        $strPath = "/".$strPath;
        
        // Removes the port from the host
        $intPosSeparator = strpos($strHost, ":");
        if ($intPosSeparator) {
            $strPort = substr($strHost, $intPosSeparator+1);
            $strHost = substr($strHost, 0, $intPosSeparator);
        }

        
        // Checks the port
        if (!empty($strPort)) {
            $this->processPort($strPort);
        }

        
        // Puts the founded url, host and path in private variables.
        $this->strUrl = $strUrl;
        $this->strHost = $strHost;
        $this->strPath = $strPath;
        
        return true;
    }

    
    /**
     * @desc The function that checks the port and put it in a private variable if it's correct.
     *
     * @param int The port.
     *
     * @return bool
     */

    protected function processPort($intPort) {
        // Checks the parameter.
        if (!is_int($intPort)) {
            throw new HttpParameterException("\$intPort must be an integer", __METHOD__);
        }

        
        // Check if it's between 0 and 65535.
        if ($intPort >= 0 && $intPort <= 65535) {
            // The port is correct, put it in a private variable.
            $this->intPort = $intPort;
            
            return true;
        }

        else {
            throw new HttpPortException ("the port must be between 0 and 65535");
        }

        
        return false;
    }

    
    /**
     * @desc The function that checks the protocol and put it in a private variable if it's correct.
     *
     * @param string The protocol.
     *
     * @return bool
     */

    protected function processProtocol($strProtocol) {
        // Checks the parameter.
        if (!is_string($intPort)) {
            throw new HttpParameterException("\$strProtocol must be a string", __METHOD__);
        }

        
        // The array of accepted protocols (in uppercase!!)
        // Source: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

        $arrAcceptedProtocols = array ("OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE", "CONNECT");
        
        // Make given protocol uppercase.
        $strProtocol = strtoupper($strProtocol);
        
        // Checks if the given protocol is accepted.
        if (in_array($strProtocol, $arrAcceptedProtocols)) {
            // The protocol is correct, put it in a private variable.
            $this->strProtocol = $strProtocol;
            
            return true;
        }

        else {
            // Throw Exception
            // Make message (use $arrAcceptedProtocols)

            $strExceptionMessage = "the protocol must be ";
            foreach($arrAcceptedProtocols as $intKey => $strProtocol) {
                if ($intKey != 0 && $intKey < (count($arrAcceptedProtocols)-1)) {
                    $strExceptionMessage .= ", ";
                }

                elseif ($intKey == (count($arrAcceptedProtocols)-1)) {
                    $strExceptionMessage .= " or ";
                }

                $strExceptionMessage .= $strProtocol;
            }

            throw new HttpProtocolException($strExceptionMessage);
        }

        
        return false;
    }

    
    /**
     * @desc The function that retrieves the response and puts it in an object.
     *
     * @return bool
     */

    protected function getResponse () {
        $strResponse = "";
        while (!feof($this->resFilePointer)) {
            $strResponse .= fread($this->resFilePointer, 4096);
        }

        
        // Process the response...
        list($strResponseHeader, $strResponseBody) = explode("\r\n\r\n", $strResponse, 2);
        // ...and puts it in an object
        $this->response = new httpResponse ($strResponseHeader, $strResponseBody);
        
        return true;
    }
}


/**
 * A class which contains the headers of the httpRequest-class.
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class httpHeaders {
    /* ########## The variables ########## */
    /* ################################### */
    
    /**
     * @var array The variable that contains an array with all headers.
     */

    protected $arrHeaders;
    
    /* ########## The public functions ########## */
    /* ########################################## */
    
    /**
     * @desc Constructor.
     *
     * @return void
     */

    public function __construct () {
        $this->arrHeaders = array();
    }

    
    /**
     * @desc toString.
     *
     * @return string
     */

    public function __toString() {
        return implode("\r\n", $this->arrHeaders)."\r\n";
    }

    
    /**
     * @desc The function to add a header.
     *
     * @param string The header to add.
     *
     * @return bool
     */

    public function add($strHeader) {
        // Checks the parameter.
        if (!is_string($strHeader)) {
            throw new HttpParameterException("\$strHeader must be a string", __METHOD__);
        }

        
        $this->arrHeaders[] = $strHeader;
    }

    
    /**
     * @desc The function to get the array with headers.
     *
     * @return array
     */

    public function getArray() {
        return $this->arrHeaders;
    }

    
    /**
     * @desc The function that removes all the headers.
     *
     * @return bool
     */

    public function clear() {
        $this->arrHeaders = array();
        return true;
    }
}


/**
 * A class which contains the arguments of the httpRequest-class.
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class httpArguments {
    /* ########## The variables ########## */
    /* ################################### */
    
    /**
     * @var array The variable that contains an array with all arguments.
     */

    protected $arrArguments;
    
    /* ########## The public functions ########## */
    /* ########################################## */
    
    /**
     * @desc Constructor.
     *
     * @return void
     */

    public function __construct () {
        $this->arrArguments = array();
    }

    
    /**
     * @desc toString.
     *
     * @return string
     */

    public function __toString() {
        $strArguments = "";
        foreach ($this->arrArguments as $mixName => $mixValue) {
            $strArguments .= "&".$mixName."=".$mixValue;
        }

        
        // Remove the first ampersand (&).
        return $strArguments = substr($strArguments, 1);
    }

    
    /**
     * @desc The function to add arguments.
     *
     * @param array The arguments to add.
     *
     * @return bool
     */

    public function add($arrArguments) {
        // Checks the parameter.
        if (!is_array($arrArguments)) {
            throw new HttpParameterException("\$arrArguments must be an array", __METHOD__);
        }

        
        // Encode the values of the arguments.
        // DON'T ENCODE THE NAMES!!!

        $arrArgumentsEncoded = array();
        foreach ($arrArguments as $mixName => $mixValue) {
            $arrArgumentsEncoded[$mixName] = urlencode($mixValue);
        }

        
        $this->arrArguments = array_merge($this->arrArguments, $arrArgumentsEncoded);
        
        return true;
    }

    
    /**
     * @desc The function that returns the length of the string.
     *
     * @return int
     */

    public function length() {
        return strlen($this->__toString());
    }

    
    /**
     * @desc The function to get the array with arguments.
     *
     * @return array
     */

    public function getArray() {
        return $this->arrArguments;
    }

    
    /**
     * @desc The function that removes all the arguments.
     *
     * @return bool
     */

    public function clear() {
        $this->arrArguments = array();
        return true;
    }
}


/**
 * A class which contains the respons of the httpRequest-class.
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class httpResponse {
    /* ########## The variables ########## */
    /* ################################### */
    
    /**
     * @var object The variable that contains an object of httpHeaders to return.
     */

    protected $objHeaders;
    
    /**
     * @var string The variable that contains the response body.
     */

    protected $strBody;
    
    
    /* ########## The public functions ########## */
    /* ########################################## */
    
    /**
     * @desc Constructor.
     *
     * @param string The response headers.
     * @param string The response body.
     *
     * @return bool
     */

    public function __construct ($strHeaders, $strBody) {
        // Checks the parameters.
        if (!is_string($strHeaders)) {
            throw new HttpParameterException("\$strHeaders must be a string", __METHOD__);
        }

        if (!is_string($strBody)) {
            throw new HttpParameterException("\$strBody must be a string", __METHOD__);
        }

        
        // There has to be given a header.
        if (empty($strHeaders)) {
            // If not:
            throw new HttpResponseException ("The response doesn't contain a header.");
        }

        else {
            $this->objHeaders = $this->createHeadersObject($strHeaders);
            $this->strBody = $strBody;
        }
    }

    
    /**
     * @desc The function that returns the headers.
     *
     * @return string
     */

    public function getHeaders() {
        return $this->objHeaders;
    }

    
    /**
     * @desc The function that returns the body.
     *
     * @return string
     */

    public function getBody() {
        return $this->strBody;
    }

    
    
    /* ########## The protected functions ########## */
    /* ############################################# */
    
    /**
     * @desc The function that makes the httpHeaders object to return.
     *
     * @param string The variable that contains the headers as a string.
     *
     * @return object
     */

    protected function createHeadersObject($strHeaders) {
        // Checks the parameter
        if (!is_string($strHeaders)) {
            throw new HttpParameterException("\$strHeaders must be a string", __METHOD__);
        }

        
        // Create the object.
        $objHeaders = new httpHeaders();
        // Make an array with headers
        $arrHeaders = explode("\r\n", $strHeaders);
        // Put them into the object
        foreach ($arrHeaders as $strHeader) {
            $objHeaders->add($strHeader);
        }

        // Return the object
        return $objHeaders;
    }
}


/**
 * A class to create a new HttpException
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class HttpException extends Exception {
    /**
     * @var string The exception name.
     */

    protected $strExceptionName;
    
    /**
     * @var string The error name.
     */

    protected $strErrorName;
    
    /**
     * @desc The function that overwrites the construct-function.
     *
     * @param string The message.
     * @param int [optional] The code.
     *
     * @return void
     */

    public function __construct($strMessage, $intCode=0) {
        // Checks the parameters.
        if (!is_string($strMessage)) {
            throw new HttpParameterException("\$strMessage must be a string", __METHOD__);
        }

        if (!is_int($intCode)) {
            throw new HttpParameterException("\$intCode must be an integer", __METHOD__);
        }

        
        // Call parent constructor.
        parent::__construct($strMessage, $intCode);
    }

    
    /**
     * @desc The function to display the exception.
     *
     * @return string
     */

    public function __toString() {
        return "<br />\n<b>".$this->strExceptionName."</b>: ".$this->strErrorName.", ".$this->message." in <b>".$this->file."</b> on line <b>".$this->line."</b>";
    }
}


/**
 * A class to create a new HttpConnectionException
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class HttpConnectionException extends HttpException {
    /**
     * @var string The exception name.
     */

    protected $strExceptionName = __CLASS__;
    
    /**
     * @var string The error name.
     */

    protected $strErrorName = "connection error";
}


/**
 * A class to create a new HttpPortException
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class HttpPortException extends HttpException {
    /**
     * @var string The exception name.
     */

    protected $strExceptionName = __CLASS__;
    
    /**
     * @var string The error name.
     */

    protected $strErrorName = "port error";
}


/**
 * A class to create a new HttpProtocolException
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class HttpProtocolException extends HttpException {
    /**
     * @var string The exception name.
     */

    protected $strExceptionName = __CLASS__;
    
    /**
     * @var string The error name.
     */

    protected $strErrorName = "protocol error";
}


/**
 * A class to create a new HttpResponseException
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class HttpResponseException extends HttpException {
    /**
     * @var string The exception name.
     */

    protected $strExceptionName = __CLASS__;
    
    /**
     * @var string The error name.
     */

    protected $strErrorName = "response error";
}


/**
 * A class to create a new HttpParameterException
 *
 * @package httpRequest
 * @author Daan van Marsbergen
 * @version 1.0-augustus 2008
 * @acces public
 */

class HttpParameterException extends HttpException {
    /**
     * @var string The exception name.
     */

    protected $strExceptionName = __CLASS__;
    
    /**
     * @var string The error name.
     */

    protected $strErrorName = "parameter error";
    
    /**
     * @desc The function that overwrites the construct-function.
     *
     * @param string The message.
     * @param string [optional] The method name where the error occured.
     * @param int [optional] The code.
     *
     * @return void
     */

    public function __construct($strMessage, $strMethod=NULL, $intCode=0) {
        // Checks the parameters.
        if (!is_string($strMessage)) {
            throw new HttpParameterException("\$strMessage must be a string", __METHOD__);
        }

        if (!is_string($strMethod) && !empty($strMethod)) {
            throw new HttpParameterException("\$strMethod must be a string", __METHOD__);
        }

        if (!is_int($intCode)) {
            throw new HttpParameterException("\$intCode must be an integer", __METHOD__);
        }

        
        // Add the method name to the message.
        if ($strMethod != NULL) {
            $strMessage .= " [<i>".$strMethod."()</i>]";
        }

        
        // Call parent constructor.
        parent::__construct($strMessage, $intCode);
    }
}

?>


Voorbeeld hoe te gebruiken:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
// Bij het maken van het object, wordt de url, het protocol en de poort gegeven.
// Dat kan op twee manieren: (let op de poort)

$httpRequest = new httpRequest("http://www.website.nl/script.php", "post", 80);
// Of:
$httpRequest = new httpRequest("http://www.website.nl:80/script.php", "post");

// Daarna worden de argumenten toegevoegd:
$arguments = array ('var1' => 'value1', 'var2' = 'value2');
$httpRequest->arguments->add($arguments);
// De argumenten kunnen ook weer worden weggehaald met:
$httpRequest->arguments->clear();

// Vervolgens worden de headers toegevoegd:
$httpRequest->headers->add('Keep-Alive: 300');
// En dit kan ook weer worden weggehaald met:
$httpRequest->headers->clear();
// De standaard headers (die altijd verzonden worden) staan op regel 122-129.

// Als alles klaar is, verzend je de HTTP request

$httpRequest->execute()
// Eventueel kan je ook vertellen hoe lang hij daar over mag doen:
$httpRequest->execute(30) // 30 seconden (standaard)

// Tot slot kan je het resultaat ophalen.
// De headers die teruggestuurd werden:

$objHeaders = $httpRequest->response->getHeaders();
echo $objHeaders;
print_r($objHeaders->getArray());
// De body (rest) die teruggestuurd werd:
echo $httpRequest->response->getBody();

// Ook kan je de verzonden headers en argumenten altijd ophalen.
// Headers:

echo $httpRequest->headers; // Als string
print_r($httpRequest->headers->getArray()); // Als array
// Argumenten:

echo $httpRequest->arguments; // Als string
print_r($httpRequest->arguments->getArray()); // Als array

?>


Gebruik van excepties:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
// Bijvoorbeeld bij het uitvoeren van de request.
try {
    $httpRequest->execute(30);
}

catch (HttpParameterException $e) {
    // Verkeerde parameter meegegeven, bijvoorbeeld een string ipv een int.
}
catch (HttpException $e) {
    // Elke exceptie die door deze classe wordt gegooid
}
catch (Exception $e) {
    // Elke exceptie
}
?>

Je hebt dus drie niveaus van excepties, waarvan twee door mij zijn gemaakt.
  • Exception: elke exceptie, maakt niet uit waar vandaan.
  • HttpException: elke exceptie die door deze class wordt gegooid, voldoet hieraan.
  • Gedetailleerdere excepties. Dit zijn:
    • HttpConnectionException (fout bij het versturen van de request)
    • HttpPortException (ongeldige port opgegeven)
    • HttpProtocolException (ongeldig protocol opgegeven)
    • HttpResponseException (een fout in de response)
    • HttpParameterException (een verkeerde parameter meegegeven)

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.