We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21177f commit 5146bbbCopy full SHA for 5146bbb
src/SharePoint/Web.php
@@ -2140,8 +2140,8 @@ public function getResourceUrl()
2140
if (!is_null($this->webUrl)) {
2141
$urlInfo = parse_url($this->getContext()->getBaseUrl());
2142
$rootSiteUrl = $urlInfo['scheme'] . '://' . $urlInfo['host'];
2143
- return "{$rootSiteUrl}{$this->webUrl}/_api/web";
2144
- #return str_replace("/_api", "{$this->webUrl}/_api", $url);
+ $webPath = str_replace($rootSiteUrl, "", $this->getContext()->getBaseUrl());
+ return str_replace("{$webPath}/_api", "{$this->webUrl}/_api", $url);
2145
}
2146
return $url;
2147
0 commit comments