Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Jan 1, 2021
1 parent 2a13232 commit c068413
Show file tree
Hide file tree
Showing 31 changed files with 79 additions and 97 deletions.
Binary file modified ExampleApps/ExampleApp_4_26/Content/HelloFetch.uasset
Binary file not shown.
2 changes: 2 additions & 0 deletions ExampleApps/ExampleApp_4_26/Plugins/Fetch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Binaries
Intermediate
26 changes: 26 additions & 0 deletions ExampleApps/ExampleApp_4_26/Plugins/Fetch/Fetch.uplugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0.0",
"FriendlyName": "Fetch",
"Description": "The Fetch API inspired HTTP client for Unreal Engine. Supports both Blueprints & C++.",
"Category": "Network",
"CreatedBy": "Arunoda Susiripala",
"CreatedByURL": "https://gamedev4k.com",
"DocsURL": "https://github.com/GameDev4K/unreal-fetch",
"MarketplaceURL": "",
"SupportURL": "https://github.com/GameDev4K/unreal-fetch",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "Fetch",
"Type": "Runtime",
"LoadingPhase": "Default"
}
],
"EngineVersion": "4.26.0",
"MarketplaceURL": ""
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

using UnrealBuildTool;

public class UnrealFetch : ModuleRules
public class Fetch : ModuleRules
{
public UnrealFetch(ReadOnlyTargetRules Target) : base(Target)
public Fetch(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#include "UnrealFetch.h"
#include "Fetch.h"

#define LOCTEXT_NAMESPACE "FUnrealFetchModule"
#define LOCTEXT_NAMESPACE "FFetchModule"

void FUnrealFetchModule::StartupModule()
void FFetchModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
}

void FUnrealFetchModule::ShutdownModule()
void FFetchModule::ShutdownModule()
{
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
// we call this function before unloading the module.
Expand All @@ -18,4 +18,4 @@ void FUnrealFetchModule::ShutdownModule()

#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FUnrealFetchModule, UnrealFetch)
IMPLEMENT_MODULE(FFetchModule, Fetch)
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "Fetch.h"
#include "FetchAPI.h"
#include "FetchRequest.h"

// Sets default values for this component's properties
UFetch::UFetch()
UFetchAPI::UFetchAPI()
{

}

UFetchRequest* UFetch::Fetch(FString Url, FFetchOptions Options)
UFetchRequest* UFetchAPI::Fetch(FString Url, FFetchOptions Options)
{
UFetchRequest* Request = NewObject<UFetchRequest>();
Request->Process(Url, Options);

return Request;
}

UFetchRequest* UFetch::FetchJson(FString Url, FFetchJsonOptions Options)
UFetchRequest* UFetchAPI::FetchJson(FString Url, FFetchJsonOptions Options)
{
FFetchOptions RealOptions;
RealOptions.Headers.Add({ "Content-Type", "application/json" });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "FetchRequest.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "FetchResponse.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "IFetch.h"

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "SimpleJson.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "SimpleJsonObject.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "SimpleJsonValue.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.


#include "Types.h"

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright Epic Games, Inc. All Rights Reserved.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"

class FUnrealFetchModule : public IModuleInterface
class FFetchModule : public IModuleInterface
{
public:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Components/SceneComponent.h"
#include "Runtime/Online/HTTP/Public/Http.h"
#include "IFetch.h"
#include "Fetch.generated.h"
#include "FetchAPI.generated.h"

//UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
UCLASS()
class UNREALFETCH_API UFetch : public UObject
class FETCH_API UFetchAPI : public UObject
{
GENERATED_BODY()

public:
// Sets default values for this component's properties
UFetch();
UFetchAPI();

public:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -12,7 +12,7 @@
*
*/
UCLASS()
class UNREALFETCH_API UFetchRequest : public UObject
class FETCH_API UFetchRequest : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -12,7 +12,7 @@
*
*/
UCLASS()
class UNREALFETCH_API UFetchResponse : public UObject
class FETCH_API UFetchResponse : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -23,7 +23,7 @@ DECLARE_DYNAMIC_DELEGATE_TwoParams(FFetchJsonResponseDelegate, USimpleJsonValue*
*
*/
UCLASS()
class UNREALFETCH_API UIFetch : public UObject
class FETCH_API UIFetch : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -12,7 +12,7 @@
*
*/
UCLASS()
class UNREALFETCH_API USimpleJson : public UObject
class FETCH_API USimpleJson : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -11,7 +11,7 @@
*
*/
UCLASS(BlueprintType)
class UNREALFETCH_API USimpleJsonObject : public UObject
class FETCH_API USimpleJsonObject : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -12,7 +12,7 @@
*
*/
UCLASS(BlueprintType)
class UNREALFETCH_API USimpleJsonValue : public UObject
class FETCH_API USimpleJsonValue : public UObject
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Fill out your copyright notice in the Description page of Project Settings.
// Copyright (c) 2020 Arunoda Susiripala. All Rights Reserved.

#pragma once

Expand All @@ -19,7 +19,7 @@ enum FFetchOptionsMethod
};

USTRUCT(BlueprintType)
struct UNREALFETCH_API FFetchHeader
struct FETCH_API FFetchHeader
{
GENERATED_BODY()

Expand All @@ -32,7 +32,7 @@ struct UNREALFETCH_API FFetchHeader
};

USTRUCT(BlueprintType)
struct UNREALFETCH_API FFetchOptions
struct FETCH_API FFetchOptions
{
GENERATED_BODY()

Expand All @@ -48,7 +48,7 @@ struct UNREALFETCH_API FFetchOptions
};

USTRUCT(BlueprintType)
struct UNREALFETCH_API FFetchJsonOptions
struct FETCH_API FFetchJsonOptions
{
GENERATED_BODY()

Expand All @@ -67,7 +67,7 @@ struct UNREALFETCH_API FFetchJsonOptions
*
*/
UCLASS()
class UNREALFETCH_API UTypes : public UObject
class FETCH_API UTypes : public UObject
{
GENERATED_BODY()

Expand Down
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file modified UnrealFetchDevApp/Content/UnrealFetchUsage.uasset
Binary file not shown.

0 comments on commit c068413

Please sign in to comment.