Files
UnrealEngineUWP/Engine/Source/Runtime/Online/HTTP/Private/HttpTests.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

46 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Interfaces/IHttpRequest.h"
/**
* Test an Http request to a specified endpoint Url
*/
class FHttpTest
{
public:
/**
* Constructor
*
* @param Verb - verb to use for request (GET,POST,DELETE,etc)
* @param Payload - optional payload string
* @param Url - url address to connect to
* @param InIterations - total test iterations to run
*/
FHttpTest(const FString& InVerb, const FString& InPayload, const FString& InUrl, int32 InIterations);
/**
* Kick off the Http request for the test and wait for delegate to be called
*/
void Run(void);
/**
* Delegate called when the request completes
*
* @param HttpRequest - object that started/processed the request
* @param HttpResponse - optional response object if request completed
* @param bSucceeded - true if Url connection was made and response was received
*/
void RequestComplete(FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded);
private:
FString Verb;
FString Payload;
FString Url;
int32 TestsToRun;
};