OnProcessRequestCompleted': not a member of 'IHttpRequest'

Hi,
I’m trying to make an HTTP request in C++, but i don’t know why i’m getting the same error.
OnProcessRequestCompleted’: not a member of ‘IHttpRequest’
here is my code:

.cpp

FHttpRequestRef HTTPReq = FHttpModule::Get().CreateRequest();|
HTTPReq->SetURL(http://localhost:3000/get-items);|
HTTPReq->SetVerb(GET);|
HTTPReq->OnProcessRequestCompleted().BindUObject(this, &UBPF_HTTPRequest::Response);|
HTTPReq->ProcessRequest();

void UBPF_HTTPRequest::Response(FHttpRequestPtr ReqOutput, FHttpResponsePtr Response, bool bIsConnected)
{
	if (Response.IsValid())
	{
		UE_LOG(LogTemp, Display, TEXT("Response: %s"), *Response->GetContentAsString());
	}
	else
	{
		UE_LOG(LogTemp, Error, TEXT("HTTP Request failed!"));
	}
}

.h

{
	GENERATED_BODY()

private:
	UFUNCTION(BlueprintCallable)
    void AliveTest(FString IPClient);

private:
	void Response(FHttpRequestPtr ReqOutput, FHttpResponsePtr Response, bool bIsConnected);
	
};

does anyone know why? Thanks

P.S: I have also tryed differend binding like BindRaw or BindLambda but nothing.

Error message tells you everything you need to know :wink:

I believe you are looking for this:

virtual FHttpRequestCompleteDelegate& OnProcessRequestComplete() = 0;

No ‘d’ on the end :slight_smile:

ohhh, my bad, Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.