PHP library now supports multipart/form-data content-type and binary fields

This commit is contained in:
Evan Seguin
2012-08-28 14:58:21 -07:00
parent eff530a5fa
commit b6939ad164
15 changed files with 168 additions and 103 deletions

View File

@@ -0,0 +1,24 @@
<?php
require_once(dirname(__FILE__) . "/HeaderAuthentication.php");
class BasicAuthentication extends HeaderAuthentication {
private $header;
function __construct($username, $password) {
$headerValue = $username . ":" . $password;
$this->header = "Authorization: Basic " . base64_encode($headerValue);
}
public function handleHeader() {
return $this->header;
}
public function handleParams() {
return null;
}
}
?>