Files
UnrealEngine/Engine/Source/Runtime/Online/HTTP/Public/Apple/ApplePlatformHttp.h
2025-05-18 13:04:45 +08:00

47 lines
923 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "GenericPlatform/GenericPlatformHttp.h"
/**
* Platform specific Http implementations
*/
class HTTP_API FApplePlatformHttp : public FGenericPlatformHttp
{
public:
/**
* Platform initialization step
*/
static void Init();
/**
* Creates a platform-specific HTTP manager.
*
* @return NULL if default implementation is to be used
*/
static FHttpManager* CreatePlatformHttpManager();
/**
* Platform shutdown step
*/
static void Shutdown();
/**
* Creates a new Http request instance for the current platform
*
* @return request object
*/
static IHttpRequest* ConstructRequest();
private:
/** Session used to create Apple based requests */
static inline NSURLSession* Session = nil;
static void InitWithNSUrlSession();
static void ShutdownWithNSUrlSession();
};
typedef FApplePlatformHttp FPlatformHttp;