A modded EditSaber for making beat saber maps.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

5 years ago
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2. #pragma once
  3. #include "Http.h"
  4. #include "MMServerRequest.generated.h"
  5. DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnResponse, const FString, response);
  6. /**
  7. * Download a file from a URL and save it locally.
  8. */
  9. UCLASS(BlueprintType, Category = "MPServerRequest")
  10. class MEDIOCREMAPPER_API UMMServerRequest : public UObject
  11. {
  12. GENERATED_BODY()
  13. public:
  14. FHttpModule* Http;
  15. UPROPERTY(BlueprintAssignable, Category = "MPServerRequest")
  16. FOnResponse OnResponse;
  17. UPROPERTY(BlueprintReadOnly, Category = "HTTP")
  18. FString uploadFile;
  19. UPROPERTY(BlueprintReadOnly, Category = "HTTP")
  20. FString output;
  21. UFUNCTION(BlueprintCallable, meta = (DisplayName = "getOutput"), Category = "MPServerRequest")
  22. FString getOutput();
  23. UMMServerRequest();
  24. ~UMMServerRequest();
  25. UFUNCTION(BlueprintCallable, Meta = (DisplayName = "Create Requester"), Category = "HTTP")
  26. static UMMServerRequest* MakeRequester();
  27. UFUNCTION(BlueprintCallable, meta = (DisplayName = "SendSong"), Category = "MPServerRequest")
  28. void SendSong();
  29. private:
  30. void OnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
  31. };