Skip to content

Commit 1dd432a

Browse files
committed
add sign req demo
1 parent c168d59 commit 1dd432a

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

demo/sign_req.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
require_once("../qiniu/auth_digest.php");
4+
require("../qiniu/http.php");
5+
6+
$url = 'https://10fd05306325.a.passageway.io';
7+
$u = array('path' => $url);
8+
$req = new Qiniu_Request($u, 'name=123.txt&hash=FkU6TEApsSV89zqQ4_Lr9IWCsdP2&size=7&key=201409030000019228_doc_1410847521821&catalog_type=P');
9+
10+
11+
$mac = Qiniu_RequireMac(null);
12+
13+
echo $mac->SignRequest($req, true);

qiniu/pfop.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class Qiniu_Pfop {
1111
public $Fops;
1212
public $NotifyURL;
1313
public $Force;
14+
public $Pipeline;
1415

1516
public function MakeRequest($self)
1617
{
@@ -22,7 +23,8 @@ public function MakeRequest($self)
2223
'key' => $this->Key,
2324
'fops' => $this->Fops,
2425
'notifyURL' => $this->NotifyURL,
25-
'force' => $this->Force
26+
'force' => $this->Force,
27+
'pipeline' => $this->Pipeline
2628
);
2729

2830
$url = $QINIU_API_HOST . '/pfop/';

0 commit comments

Comments
 (0)