TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = Http->CreateRequest();
FString JsonString = “{"name":"john", "age":22, "class":"mca"}”;
Request->SetHeader(TEXT("Content-Type"), TEXT("application/json"));
Request->SetURL("http://localhost/api.php");
Request->SetVerb("POST");
Request->SetContentAsString(JsonString);
Request->OnProcessRequestComplete().BindUObject(this, &UAuthWidget::OnResponseReceived);
Request->ProcessRequest();
When submitting to server api in $_POST is empty.
If you remove the application/json of header, then this line comes to $_POST, of course it is not valid…
Why is there so little information about working with api?