Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 1c1182f

Browse files
committed
update ..
1 parent 5e3a230 commit 1c1182f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/utils/Curl.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,29 @@ public function get($url, $params = [], array $headers = [], array $options = []
129129

130130
public function post($url, $data = [], array $headers = [], array $options = [])
131131
{
132+
$options[CURLOPT_POST] = true;
133+
132134
return $this->request($url, $data, self::POST, $headers, $options);
133135
}
134136

135137
public function put($url, $data = [], array $headers = [], array $options = [])
136138
{
139+
$options[CURLOPT_PUT] = true;
140+
137141
return $this->request($url, $data, self::PUT, $headers, $options);
138142
}
139143

140144
public function patch($url, $data = [], array $headers = [], array $options = [])
141145
{
146+
$options[CURLOPT_CUSTOMREQUEST] = self::PATCH;
147+
142148
return $this->request($url, $data, self::PATCH, $headers, $options);
143149
}
144150

145151
public function delete($url, $data = [], array $headers = [], array $options = [])
146152
{
153+
$options[CURLOPT_CUSTOMREQUEST] = self::DELETE;
154+
147155
return $this->request($url, $data, self::DELETE, $headers, $options);
148156
}
149157

0 commit comments

Comments
 (0)