# How can I resolve the error "Unrecognized type 'FHttpRequestPtr'"?

**URL:** <https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711>\
**Category:** Platform & Builds\
**Tags:** error, unreal-engine, http, question\
**Created:** [May 7, 2014, 10:13am UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711 "2014-05-07T10:13:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaochun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shaochun](https://forums.unrealengine.com/u/shaochun)\
**Post date:** [May 7, 2014, 10:13am UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/1 "2014-05-07T10:13:38Z")

</div>

I keep getting the error **Unrecognized type ‘FHttpRequestPtr’** when compiling, however, both the followings have been added to the appropriate locations:

```
// LightSender.h
#include "Http.h" 
#include "LightSender.generated.h"

```

and

```
// LightSenderProject.Build.cs
PrivateDependencyModuleNames.AddRange(new string[] { "HTTP" }); 
PrivateIncludePathModuleNames.AddRange(new string[] { "HTTP" });

```

What else could I try?

Thanks.

---

<div class="post-metadata">

**Author:** ![shaochun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shaochun](https://forums.unrealengine.com/u/shaochun)\
**Post date:** [May 7, 2014, 10:07pm UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/2 "2014-05-07T22:07:08Z")

</div>

Or maybe someone could point out how to debug this issue?

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 8, 2014, 6:40am UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/3 "2014-05-08T06:40:47Z")

</div>

FHttpRequestPtr is defined in

IHttpRequest.h

which is included in

Http.h as

```
#pragma once

 // Module dependencies
#include "Interfaces/IHttpBase.h"
#include "Interfaces/IHttpRequest.h"
 #include "Interfaces/IHttpResponse.h"

```

Seems like what you have already would work

have you tried

```
#include "IHttpRequest.h"

```

?

---

<div class="post-metadata">

**Author:** ![shaochun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shaochun](https://forums.unrealengine.com/u/shaochun)\
**Post date:** [May 8, 2014, 7:05am UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/4 "2014-05-08T07:05:48Z")

</div>

Yes, but I am still getting the same error.  
It seems that for some reason the .h file didn’t get parsed, even if I have cleaned the solution.

```
// LightSender.h
#pragma once

#include "GameFramework/Actor.h"
#include "Http.h"
#include "IHttpRequest.h"
#include "LightSender.generated.h"

/**
 * 
 */
UCLASS()
class ALightSender : public AActor
{
	GENERATED_UCLASS_BODY()

	/** point light component */
	UPROPERTY(VisibleAnywhere, Category = "Switch Components")
	TSubobjectPtr<UPointLightComponent> PointLight1;

	/** sphere component */
	UPROPERTY(VisibleAnywhere, Category = "Switch Components")
		TSubobjectPtr<USphereComponent> Sphere1;

	UFUNCTION()
		void OnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
	
};
```

---

<div class="post-metadata">

**Author:** ![shaochun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shaochun](https://forums.unrealengine.com/u/shaochun)\
**Post date:** [May 8, 2014, 10:02am UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/5 "2014-05-08T10:02:55Z")

</div>

FHttpRequestPtr is actually **TSharedPtr\< IHttpRequest \>** , where **TSharedPtr** isn’t supposed to be used in U\* macro.

Source [here](https://answers.unrealengine.com/questions/7747/unrecognized-type-tsharedptr.html).

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [December 11, 2014, 2:33pm UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/6 "2014-12-11T14:33:09Z")

</div>

#The Solution

If anyone else has this issue, the solution is that in addition to using

```
#include "Http.h"

```

you must also add this to your build.cs

```
PublicDependencyModuleNames.AddRange(new string[] { 
	"Core", "CoreUObject", "Engine", "InputCore",
           
        "HTTP" //< ~~~~~~~
});
```

---

<div class="post-metadata">

**Author:** ![VenomStyx](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/venomstyx/32/490334_2.png) [@VenomStyx](https://forums.unrealengine.com/u/VenomStyx)\
**Post date:** [October 28, 2022, 2:55am UTC](https://forums.unrealengine.com/t/how-can-i-resolve-the-error-unrecognized-type-fhttprequestptr/282711/7 "2022-10-28T02:55:24Z")

</div>

For anyone else looking now, make sure you aren’t using **UFUNCTION** for the function. Apparently that causes issues. If anyone knows why i’d love to understand 🙂
