Completed
Push — master ( e6cd79...15515b )
by Mike
02:12
created

POSTFile::setBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace SugarAPI\SDK\Request;
4
5
6
class POSTFile extends POST {
7
8
    /**
9
     * @inheritdoc
10
     */
11
    protected static $_DEFAULT_HEADERS = array(
12
        "Content-Type: multipart/form-data"
13
    );
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function setBody($body) {
19
        $this->body = $body;
20
        $this->setOption(CURLOPT_POSTFIELDS,$this->body);
21
        return $this;
22
    }
23
24
}