forked from friendica/friendica-addons
Remove accept parameter for request again
This commit is contained in:
parent
707e03635b
commit
46221882c3
|
@ -111,7 +111,7 @@ class WebDav implements ICanWriteToStorage
|
||||||
HttpClientOptions::BODY => $dom->saveXML(),
|
HttpClientOptions::BODY => $dom->saveXML(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $this->client->request('propfind', $uri, HttpClientAccept::DEFAULT, $opts);
|
$response = $this->client->request('propfind', $uri, $opts);
|
||||||
|
|
||||||
$responseDoc = new \DOMDocument();
|
$responseDoc = new \DOMDocument();
|
||||||
$responseDoc->loadXML($response->getBody());
|
$responseDoc->loadXML($response->getBody());
|
||||||
|
@ -134,7 +134,7 @@ class WebDav implements ICanWriteToStorage
|
||||||
*/
|
*/
|
||||||
protected function mkcol(string $uri): bool
|
protected function mkcol(string $uri): bool
|
||||||
{
|
{
|
||||||
return $this->client->request('mkcol', $uri, HttpClientAccept::DEFAULT, [HttpClientOptions::AUTH => $this->authOptions])
|
return $this->client->request('mkcol', $uri, [HttpClientOptions::AUTH => $this->authOptions])
|
||||||
->getReturnCode() == 200;
|
->getReturnCode() == 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ class WebDav implements ICanWriteToStorage
|
||||||
{
|
{
|
||||||
$file = $this->pathForRef($reference);
|
$file = $this->pathForRef($reference);
|
||||||
|
|
||||||
$response = $this->client->request('get', $this->url . '/' . $file[0], HttpClientAccept::DEFAULT, [HttpClientOptions::AUTH => $this->authOptions]);
|
$response = $this->client->request('get', $this->url . '/' . $file[0], [HttpClientOptions::AUTH => $this->authOptions]);
|
||||||
|
|
||||||
if (!$response->isSuccess()) {
|
if (!$response->isSuccess()) {
|
||||||
throw new ReferenceStorageException(sprintf('Invalid reference %s', $reference));
|
throw new ReferenceStorageException(sprintf('Invalid reference %s', $reference));
|
||||||
|
@ -230,7 +230,7 @@ class WebDav implements ICanWriteToStorage
|
||||||
HttpClientOptions::AUTH => $this->authOptions,
|
HttpClientOptions::AUTH => $this->authOptions,
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->client->request('put', $this->url . '/' . $file[0], HttpClientAccept::DEFAULT, $opts);
|
$this->client->request('put', $this->url . '/' . $file[0], $opts);
|
||||||
|
|
||||||
return $reference;
|
return $reference;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ class WebDav implements ICanWriteToStorage
|
||||||
{
|
{
|
||||||
$file = $this->pathForRef($reference);
|
$file = $this->pathForRef($reference);
|
||||||
|
|
||||||
$response = $this->client->request('delete', $this->url . '/' . $file[0], HttpClientAccept::DEFAULT, [HttpClientOptions::AUTH => $this->authOptions]);
|
$response = $this->client->request('delete', $this->url . '/' . $file[0], [HttpClientOptions::AUTH => $this->authOptions]);
|
||||||
|
|
||||||
if (!$response->isSuccess()) {
|
if (!$response->isSuccess()) {
|
||||||
throw new ReferenceStorageException(sprintf('Invalid reference %s', $reference));
|
throw new ReferenceStorageException(sprintf('Invalid reference %s', $reference));
|
||||||
|
|
Loading…
Reference in a new issue