UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
HttpResponse.mock.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
5#include "Tests/TestHelpers.h"
6
7#if WITH_DEV_AUTOMATION_TESTS
8
9namespace BuildPatchServices
10{
12 : public IHttpResponse
13 {
14 public:
17
18 public:
19 virtual int32 GetResponseCode() const override
20 {
21 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetResponseCode");
22 return static_cast<int32>(EHttpResponseCodes::Ok);
23 }
24
25 virtual FString GetContentAsString() const override
26 {
27 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetContentAsString");
28 return FString();
29 }
30
31 virtual FUtf8StringView GetContentAsUtf8StringView() const override
32 {
33 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetContentAsUtf8StringView");
34 return FUtf8StringView();
35 }
36
37 virtual const FString& GetURL() const override
38 {
39 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetURL");
40 return URL;
41 }
42
43 virtual FString GetURLParameter(const FString& ParameterName) const override
44 {
45 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetURLParameter");
46 return FString();
47 }
48
49 virtual FString GetHeader(const FString& HeaderName) const override
50 {
51 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetHeader");
52 return FString();
53 }
54
55 virtual TArray<FString> GetAllHeaders() const override
56 {
57 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetAllHeaders");
58 return TArray<FString>();
59 }
60
61 virtual FString GetContentType() const override
62 {
63 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetContentType");
64 return FString();
65 }
66
67 virtual uint64 GetContentLength() const override
68 {
69 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetContentLength");
70 return uint64();
71 }
72
73 virtual const TArray<uint8>& GetContent() const override
74 {
75 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetContent");
76 static TArray<uint8> None;
77 return None;
78 }
79
80 virtual EHttpRequestStatus::Type GetStatus() const override
81 {
82 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetStatus");
84 }
85
86 virtual EHttpFailureReason GetFailureReason() const override
87 {
88 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetFailureReason");
90 }
91
92 virtual const FString& GetEffectiveURL() const override
93 {
94 MOCK_FUNC_NOT_IMPLEMENTED("FMockHttpRequest::GetEffectiveURL");
95 static FString None;
96 return None;
97 }
98
99 private:
100 FString URL;
101 };
102}
103
104#endif //WITH_DEV_AUTOMATION_TESTS
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EHttpFailureReason
Definition IHttpBase.h:59
TStringView< UTF8CHAR > FUtf8StringView
Definition StringFwd.h:48
Definition IHttpResponse.h:111
Definition Array.h:670
Definition BuildPatchFileConstructor.h:28
Type
Definition IHttpBase.h:13
@ Failed
Definition IHttpBase.h:19
@ URL
Definition TokenizedMessage.h:47
Definition Tuple.h:652