Showing the changes to libraries/script-engine/src/XMLHttpRequestClass.cpp (1 of 29 files). Show all
Unified · Split
| @@ -20,12 +20,11 @@ · 19 unmodified lines | |||
| 20 | #include <AccountManager.h> | 20 | #include <AccountManager.h> |
| 21 | #include <NetworkAccessManager.h> | 21 | #include <NetworkAccessManager.h> |
| 22 | #include <NetworkingConstants.h> | 22 | #include <NetworkingConstants.h> |
| 23 | #include <MetaverseAPI.h> | ||
| 23 | 24 | ||
| 24 | #include "ResourceRequestObserver.h" | 25 | #include "ResourceRequestObserver.h" |
| 25 | #include "ScriptEngine.h" | 26 | #include "ScriptEngine.h" |
| 26 | 27 | ||
| 27 | const QString METAVERSE_API_URL = NetworkingConstants::METAVERSE_SERVER_URL().toString() + "/api/"; | ||
| 28 | |||
| 29 | Q_DECLARE_METATYPE(QByteArray*) | 28 | Q_DECLARE_METATYPE(QByteArray*) |
| 30 | 29 | ||
| 31 | XMLHttpRequestClass::XMLHttpRequestClass(QScriptEngine* engine) : | 30 | XMLHttpRequestClass::XMLHttpRequestClass(QScriptEngine* engine) : |
| @@ -126,6 +125,8 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a · 94 unmodified lines | |||
| 126 | _url.setUrl(url); | 125 | _url.setUrl(url); |
| 127 | _async = async; | 126 | _async = async; |
| 128 | 127 | ||
| 128 | const QString METAVERSE_API_URL = MetaverseAPI::getCurrentMetaverseServerURL().toString() + "/api/"; | ||
| 129 | |||
| 129 | if (url.toLower().left(METAVERSE_API_URL.length()) == METAVERSE_API_URL) { | 130 | if (url.toLower().left(METAVERSE_API_URL.length()) == METAVERSE_API_URL) { |
| 130 | auto accountManager = DependencyManager::get<AccountManager>(); | 131 | auto accountManager = DependencyManager::get<AccountManager>(); |
| 131 | 132 | ||