Lesson 60 - Making an HTTP Request
This commit is contained in:
42
.idea/.idea.FPSTemplate.dir/.idea/workspace.xml
generated
42
.idea/.idea.FPSTemplate.dir/.idea/workspace.xml
generated
@@ -119,7 +119,8 @@
|
|||||||
<list default="true" id="91dd7ef3-692f-484d-9bd1-060b29650efd" name="Changes" comment="">
|
<list default="true" id="91dd7ef3-692f-484d-9bd1-060b29650efd" name="Changes" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.FPSTemplate.dir/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.build.cs" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/HTTP/HTTPRequestManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/HTTP/HTTPRequestManager.h" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestManager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Private/UI/APITest/APITestManager.cpp" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestManager.h" beforeDir="false" afterPath="$PROJECT_DIR$/Source/DedicatedServers/Public/UI/APITest/APITestManager.h" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -138,6 +139,7 @@
|
|||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="HighlightingSettingsPerFile">
|
<component name="HighlightingSettingsPerFile">
|
||||||
|
<setting file="cidr-memory-view://0" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.Build.cs" root0="SKIP_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/DedicatedServers.Build.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/Data/API/APIData.cpp" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/Data/API/APIData.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/Game/DS_GameMode.cpp" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Source/DedicatedServers/Private/Game/DS_GameMode.cpp" root0="FORCE_HIGHLIGHTING" />
|
||||||
@@ -177,25 +179,25 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
"RunOnceActivity.MCP Project settings loaded": "true",
|
"RunOnceActivity.MCP Project settings loaded": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
"Uproject.FPSTemplate.executor": "Run",
|
"Uproject.FPSTemplate.executor": "Debug",
|
||||||
"git-widget-placeholder": "new/API__Gateway__v2",
|
"git-widget-placeholder": "new/API__Gateway__v2",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"settings.editor.selected.configurable": "ml.llm.AcpAgentsConfigurable",
|
"settings.editor.selected.configurable": "ml.llm.AcpAgentsConfigurable",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
<component name="RunManager" selected="Uproject.FPSTemplate">
|
<component name="RunManager" selected="Uproject.FPSTemplate">
|
||||||
<configuration name="UnrealAndroidFileTool: UAFT-linux-x64" type="DotNetMsBuildPublish" factoryName="Publish to IIS">
|
<configuration name="UnrealAndroidFileTool: UAFT-linux-x64" type="DotNetMsBuildPublish" factoryName="Publish to IIS">
|
||||||
<riderPublish publish_profile="UAFT-linux-x64.pubxml" pubxml_path="$PROJECT_DIR$/../../UE_5_7_3/Engine/Source/Programs/UnrealAndroidFileTool/Properties/PublishProfiles/UAFT-linux-x64.pubxml" uuid_high="7955553615007426355" uuid_low="1901880150328835101" />
|
<riderPublish publish_profile="UAFT-linux-x64.pubxml" pubxml_path="$PROJECT_DIR$/../../UE_5_7_3/Engine/Source/Programs/UnrealAndroidFileTool/Properties/PublishProfiles/UAFT-linux-x64.pubxml" uuid_high="7955553615007426355" uuid_low="1901880150328835101" />
|
||||||
@@ -64925,7 +64927,7 @@
|
|||||||
<workItem from="1774233517830" duration="18186000" />
|
<workItem from="1774233517830" duration="18186000" />
|
||||||
<workItem from="1774317832300" duration="32871000" />
|
<workItem from="1774317832300" duration="32871000" />
|
||||||
<workItem from="1774531822750" duration="19882000" />
|
<workItem from="1774531822750" duration="19882000" />
|
||||||
<workItem from="1774817723065" duration="6192000" />
|
<workItem from="1774817723065" duration="8009000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="Added in EC2 support and adjusted Anywhere if statement to allow EC2 and to clean uip variable placement.">
|
<task id="LOCAL-00001" summary="Added in EC2 support and adjusted Anywhere if statement to allow EC2 and to clean uip variable placement.">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ public class DedicatedServers : ModuleRules
|
|||||||
"CoreUObject",
|
"CoreUObject",
|
||||||
"Engine",
|
"Engine",
|
||||||
"OpenSSL",
|
"OpenSSL",
|
||||||
"GameplayTags"
|
"GameplayTags",
|
||||||
|
"HTTP"
|
||||||
});
|
});
|
||||||
|
|
||||||
PrivateDependencyModuleNames.AddRange(new string[]
|
PrivateDependencyModuleNames.AddRange(new string[]
|
||||||
|
|||||||
@@ -2,8 +2,28 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "UI/APITest/APITestManager.h"
|
#include "UI/APITest/APITestManager.h"
|
||||||
|
#include "HttpModule.h"
|
||||||
|
#include "Data/API/APIData.h"
|
||||||
|
#include "GameplayTags/DedicatedServerTags.h"
|
||||||
|
|
||||||
void UAPITestManager::ListFleetsButtonClicked()
|
void UAPITestManager::ListFleetsButtonClicked()
|
||||||
{
|
{
|
||||||
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "List Fleets Button Clicked");
|
check(APIData);
|
||||||
|
|
||||||
|
TSharedPtr<IHttpRequest> Request = FHttpModule::Get().CreateRequest();
|
||||||
|
Request->OnProcessRequestComplete().BindUObject(this, &UAPITestManager::ListFleets_Response);
|
||||||
|
|
||||||
|
const FString APIUrl = APIData->GetAPIEndPoint(DedicatedServersTags::GameSessionsAPI::ListFleets);
|
||||||
|
|
||||||
|
Request->SetURL(APIUrl);
|
||||||
|
Request->SetVerb("GET");
|
||||||
|
Request->SetHeader("Content-Type", "application/json");
|
||||||
|
Request->ProcessRequest();
|
||||||
|
|
||||||
|
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "List Fleets Request Made");
|
||||||
|
}
|
||||||
|
|
||||||
|
void UAPITestManager::ListFleets_Response(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
|
||||||
|
{
|
||||||
|
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "List Fleets Response Received");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
|
#include "Interfaces/IHttpRequest.h"
|
||||||
#include "UI/HTTP/HTTPRequestManager.h"
|
#include "UI/HTTP/HTTPRequestManager.h"
|
||||||
#include "APITestManager.generated.h"
|
#include "APITestManager.generated.h"
|
||||||
|
|
||||||
@@ -18,4 +19,6 @@ public:
|
|||||||
|
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void ListFleetsButtonClicked();
|
void ListFleetsButtonClicked();
|
||||||
|
|
||||||
|
void ListFleets_Response(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user