Skip to content

Commit b753ab7

Browse files
committed
Fix put method to match wolt body
1 parent 027fca1 commit b753ab7

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/WoltClient.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,13 @@ public function post(array $data = []): Response
7070
->post($this->getFullUrl(), $data);
7171
}
7272

73-
74-
public function patch(array $data = []): Response
75-
{
76-
return $this->prepareRequest()
77-
->patch($this->getFullUrl(), $data);
78-
}
79-
80-
public function put(array $data = []): Response
73+
public function put(null|array $data = null): Response
8174
{
8275
return $this->prepareRequest()
83-
->put($this->getFullUrl(), $data);
84-
}
76+
->send('PUT', $this->getFullUrl(), [
77+
'json' => $data,
78+
]);
8579

86-
public function delete(array $data = []): Response
87-
{
88-
return $this->prepareRequest()
89-
->delete($this->getFullUrl(), $data);
9080
}
9181

9282
/******************** SETTERS && GETTERS ********************/

0 commit comments

Comments
 (0)