I was able to upload scores to my website (and database) thanks to your video! Thank you. Do you know if its possible to interact with the built-in browser's cookies? I have a website that currently has persistent login for users, and I want players to not have to log in every time when inside the built-in browser. However, the browser seems to clear all cookies and storage when it closes.
@@Flopperam The game is not in a web browser, but rather the web browser is in the game. When I said built-in browser, I meant the web browser widget that you can use inside the engine. Also, I don't think this is your video about web sockets. Basically, I'm just wanting to be able to display a page on the internet (that requires authentication using using http headers) inside my game.
Hey sorry for the late response but if you're using the web browser widget, you can execute client side JavaScript thought the SWebBrowser ExecuteJavascript method. You can also get the IWebBrowserCookieManager through the IWebBrowserSingleton through the IWebBrowserModule and through the cookie manager you can delete and set cookies. You could explore docs.unrealengine.com/5.0/en-US/API/Runtime/WebBrowser and see what else they have regarding cookies.
@@Flopperam Thanks for the response. I tried going through the Web Browser API but I couldn't wrap my head around how the different classes worked together in C++. I ended up getting it working using the ExecuteJavascript method in the web browser widget. However I had to omit the "httpOnly" and "Secure" properties. I'm not sure if there's a way to get around that though.
Thanks for this tutorial. I am having an error when writing the code for the POST request, it is in the Serialize function. I am getting a " no overload function matches..." I am using UE4.27, and i am writing the same code you suggest in your tutorial.
@@Flopperam Yes i did include the modules "HTTP" , "Json" and still i got the same error. Here is the error i am getting when compiling in UE4: drive.google.com/file/d/1bm_NIZ7BxDaR_ot6iOuFgV-T_ZwxU-PK/view?usp=sharing I am sure i posted this comment yesterday... did it got removed?
Really nice video only 1 thing is that would it be possible to have a request body for a get request rather than a post request because when I tried that its not working
Hey sorry for the late response. I took a peek at the source code for HTTP and I don't see anything that would prevent a GET request from having a body. May I ask how you're implementing your http request?
@@Flopperam hey sorry for the late response and I'm implementing the body the same way it would be implemented in a post request but I think due to GET requests conventionally not having bodies unreal doesn't take the body into consideration and just treats it as a message rather than a payload to obtain data
I tried to make a blueprint function library for this, but i'm having an issue binding the delegate as I cannot bind object from a static method. Is there a simple workaround for that? Thank you
Thank you for the video! Really helpful! Are you sure that the POST request is working? I tried using existing titles in the json but it's always returning "id 101"
Are you using the url used in the video? If so, I think that's fine since the dummy api always returns the same thing since it doesn't reference a database I believe.
@@Flopperam I started using the url in the video (I tried it on postman too, it's faster than compiling every time) and I thought it wasn't working, then I read the guide of your website and it says that it should return 101 because it's not really working 😅 Fortunately I was able to use it for my needs, thank you so much again! Do you know if is there a way to pass a parameter (like a string) to the bound event to recognize it from the others? If I make requests for several files, how can you know which is which?
@@Ares9323 Which bound event? The bound events on the server? or the ones on the Unreal client side? Because the Unreal WebSocket->Send message allows the Unreal client to send data that can be captured by the websocet's on('message') event handler in this case. And ofc the websocket server can send data back to the client.
@@Flopperam I ended up using BindWeakLambda instead of BindUObject, I needed to pass an additional variable (in addition to Request, Response and bWasSuccessful), it would have been very hard to find a decent solution without your video!
Yes, eventually we will. I know it's taking a while and I apologize for that but we're just focused on getting our video production out at the moment. However, we do want to get back to making videos on the more complicated topics soon, and of course in C++!
seems like when you add "UFUNCTION" together with a function signature including "FHttpRequestPtr" or "FHttpResponsePtr" in the header it will complain with error: "Unrecognized type 'FHttpRequestPtr' - type must be a UCLASS, USTRUCT or UENUM" any idea on how to solve this?
Sorry for the late response. It's been a while but I believe I encountered this before. I think this happens because FHttpRequestPtr isn't exposed to blueprints. I think you could expose it yourself but I'm not sure.
Hi, i was using that example to download image, but it crashes editor when I trying just even to UE_LOG(LogTemp, Display, TEXT("Response %s"), bWasSuccessful);
Hi Mahn, I have a situation where I will be awaiting response from a lambda function through AWS API Gateway. Could you give me an idea on how to implement a condition where if the api call is being timed out, it will call again until the UE client HTTP request have a response from the lambda function. In simple terms, How can you recall the same API request if the last call got timed out without any response.
You could set up a timer that loops every x seconds and makes a http request if you never got a response from the last one. However you should get a response even in the case of time out. You could lower the time out in API gateway or lambda since sometimes if the timeout is too long you may not get a response back.
I used the same code used in a video And used discord webhook url but it didnot work Any idea how to solve? My goal is to take snapshot of game in unreal engine in runtime and send it to discord server when some button is pressed
Firstly, thanks so much for this, it's awesome. What I need to do is loop through a JSON list in blueprints. I'm just not sure how to expose a value back to the blueprint, since the function that returns the data isn't the called function. I'm very new to blueprint functions, so if you could maybe just point me in a direction. Thanks again.
I don't think the json module is directly exposed to blueprints, so you'll probably have to write a c++ function that takes in a json list parameter and does what you want, then make the function callable in blueprints.
@@Flopperam Ok, thanks. So let's say I use c++ and create a list of Actors that i want to return. How would I send that list back. I'm looking into dynamic delegates at the moment. Is that the right approach?
@@Flopperam It works, thanks! I would like to see if you have any other video that you can make it into blueprint after scripting it. Is there any? Or do you have any reference videos? Thanks
Hey, I would suggest doing research on the UFUNCTION tag in unreal so that you can turn a c++ function into a blueprint function, hence being able to call your http request code from anywhere in blueprints.
I just came back to this video after a little break from UE and I am not really sure what I was asking in my parent question. I think what I meant more was getting an HTTP Request to happen in an already made gamemode such as Third or First person. I think the reason for this was because you create a "StartPlay()" function call so that you create a request when your game starts, since other game modes use blueprints its kind of hard to understand how to get this to happen since there is no "startplay()" function. @@Flopperam
Actually I was wrong, it seems unreal does have this functionality, docs.unrealengine.com/4.27/en-US/API/Runtime/HTTP/Interfaces/IHttpRequest/. The IHttpRequest interface has a SetContentAsStreamedFile method that takes in a FString parameter representing the file name. docs.unrealengine.com/4.27/en-US/API/Runtime/HTTP/Interfaces/IHttpRequest/SetContentAsStreamedFile/
Hey, I would suggest, in the editor, going to Edit > Editor Preferences > General > Keyboard Shortcuts and checking to see which keyboard shortcut combo handles toggling on/off full screen on the viewport.
Great video. Great pacing. In depth, but to the point. Keep up the good work, we appreciate it!
Most beautiful videos about ue4-5, most underrated youtuber...WHY WORLD, JUST WHYYY
Straight to the point, not wasting my time with TH-cam fluff and puff. Love from Norway.
Clear, concise, exactly what i needed! Thank you for this.
this is crazy- I don't fully understand but I will watch again a few more times, it seems like the implications of this are pretty powerful
Thank You!
good video! this is basically how games get scoreboard data etc
Hey, great video, I just want to ask, is there a way to send a DELETE request without using plugins?
Hmmm, have you tried specifying "DELETE" as the verb in the HTTP request instead of "GET" and "POST" like I did in the video?
@@Flopperam It works! thank you very much!
I was able to upload scores to my website (and database) thanks to your video! Thank you. Do you know if its possible to interact with the built-in browser's cookies? I have a website that currently has persistent login for users, and I want players to not have to log in every time when inside the built-in browser. However, the browser seems to clear all cookies and storage when it closes.
Is the game on a web browser? Trying to understand the infrastructure of your set up since the video is about web sockets so I'm a little confused.
@@Flopperam The game is not in a web browser, but rather the web browser is in the game. When I said built-in browser, I meant the web browser widget that you can use inside the engine. Also, I don't think this is your video about web sockets. Basically, I'm just wanting to be able to display a page on the internet (that requires authentication using using http headers) inside my game.
Hey sorry for the late response but if you're using the web browser widget, you can execute client side JavaScript thought the SWebBrowser ExecuteJavascript method. You can also get the IWebBrowserCookieManager through the IWebBrowserSingleton through the IWebBrowserModule and through the cookie manager you can delete and set cookies. You could explore docs.unrealengine.com/5.0/en-US/API/Runtime/WebBrowser and see what else they have regarding cookies.
@@Flopperam Thanks for the response. I tried going through the Web Browser API but I couldn't wrap my head around how the different classes worked together in C++. I ended up getting it working using the ExecuteJavascript method in the web browser widget. However I had to omit the "httpOnly" and "Secure" properties. I'm not sure if there's a way to get around that though.
Great tutorial! Exactly what I needed
Thanks for this tutorial.
I am having an error when writing the code for the POST request, it is in the Serialize function.
I am getting a " no overload function matches..."
I am using UE4.27, and i am writing the same code you suggest in your tutorial.
Hey, at what timestamp is this error occurring?
@@Flopperam 9:13
@@220damien In your project's build.cs file, did you add "Json" to the list of public dependency module names.
@@Flopperam Yes i did include the modules "HTTP" , "Json" and still i got the same error.
Here is the error i am getting when compiling in UE4:
drive.google.com/file/d/1bm_NIZ7BxDaR_ot6iOuFgV-T_ZwxU-PK/view?usp=sharing
I am sure i posted this comment yesterday... did it got removed?
When you return for more tutorials ??
Soon, just started a new job and am still recovering from my injury but I still want to make tutorials.
Really nice video only 1 thing is that would it be possible to have a request body for a get request rather than a post request because when I tried that its not working
Hmmm, I haven't tried that before but if it that's not working then I'm not sure, may be an unreal issue. I can look at the source code later
@@Flopperam Yeah would be really awesome i couldn't figure it out
Hey sorry for the late response. I took a peek at the source code for HTTP and I don't see anything that would prevent a GET request from having a body. May I ask how you're implementing your http request?
@@Flopperam hey sorry for the late response and I'm implementing the body the same way it would be implemented in a post request but I think due to GET requests conventionally not having bodies unreal doesn't take the body into consideration and just treats it as a message rather than a payload to obtain data
can you make tutorial for RCON? thanks
Not too familiar with that but will add to the list
I tried to make a blueprint function library for this, but i'm having an issue binding the delegate as I cannot bind object from a static method. Is there a simple workaround for that?
Thank you
Hmmm, does it have to be a static method?
Thank you for the video! Really helpful! Are you sure that the POST request is working? I tried using existing titles in the json but it's always returning "id 101"
Are you using the url used in the video? If so, I think that's fine since the dummy api always returns the same thing since it doesn't reference a database I believe.
@@Flopperam I started using the url in the video (I tried it on postman too, it's faster than compiling every time) and I thought it wasn't working, then I read the guide of your website and it says that it should return 101 because it's not really working 😅
Fortunately I was able to use it for my needs, thank you so much again!
Do you know if is there a way to pass a parameter (like a string) to the bound event to recognize it from the others?
If I make requests for several files, how can you know which is which?
@@Ares9323 Which bound event? The bound events on the server? or the ones on the Unreal client side? Because the Unreal WebSocket->Send message allows the Unreal client to send data that can be captured by the websocet's on('message') event handler in this case. And ofc the websocket server can send data back to the client.
@@Flopperam I ended up using BindWeakLambda instead of BindUObject, I needed to pass an additional variable (in addition to Request, Response and bWasSuccessful), it would have been very hard to find a decent solution without your video!
how to edit build.cs if you started project in blueprints
Sorry for the late response but you would have to manually create a build.cs file in the case of blueprint projects.
@@Flopperam Thank
Could you do a Firebase or Playfab for Unreal Engine using C++ tutorial?
Yes, eventually we will. I know it's taking a while and I apologize for that but we're just focused on getting our video production out at the moment. However, we do want to get back to making videos on the more complicated topics soon, and of course in C++!
seems like when you add "UFUNCTION" together with a function signature including "FHttpRequestPtr" or "FHttpResponsePtr" in the header it will complain with error: "Unrecognized type 'FHttpRequestPtr' - type must be a UCLASS, USTRUCT or UENUM" any idea on how to solve this?
Sorry for the late response. It's been a while but I believe I encountered this before. I think this happens because FHttpRequestPtr isn't exposed to blueprints. I think you could expose it yourself but I'm not sure.
Hi, i was using that example to download image, but it crashes editor when I trying just even to UE_LOG(LogTemp, Display, TEXT("Response %s"), bWasSuccessful);
What was the error message/response that you received.
Hi Mahn, I have a situation where I will be awaiting response from a lambda function through AWS API Gateway. Could you give me an idea on how to implement a condition where if the api call is being timed out, it will call again until the UE client HTTP request have a response from the lambda function. In simple terms, How can you recall the same API request if the last call got timed out without any response.
You could set up a timer that loops every x seconds and makes a http request if you never got a response from the last one. However you should get a response even in the case of time out. You could lower the time out in API gateway or lambda since sometimes if the timeout is too long you may not get a response back.
I used the same code used in a video
And used discord webhook url but it didnot work
Any idea how to solve?
My goal is to take snapshot of game in unreal engine in runtime and send it to discord server when some button is pressed
Hey, is their documentation for the discord webhook you're using?
Firstly, thanks so much for this, it's awesome. What I need to do is loop through a JSON list in blueprints. I'm just not sure how to expose a value back to the blueprint, since the function that returns the data isn't the called function. I'm very new to blueprint functions, so if you could maybe just point me in a direction. Thanks again.
I don't think the json module is directly exposed to blueprints, so you'll probably have to write a c++ function that takes in a json list parameter and does what you want, then make the function callable in blueprints.
@@Flopperam Ok, thanks. So let's say I use c++ and create a list of Actors that i want to return. How would I send that list back. I'm looking into dynamic delegates at the moment. Is that the right approach?
Delegates can work yes
Is the content deprecated?
I believe this tutorial still works
@@Flopperam It works, thanks! I would like to see if you have any other video that you can make it into blueprint after scripting it. Is there any? Or do you have any reference videos? Thanks
Hey, I would suggest doing research on the UFUNCTION tag in unreal so that you can turn a c++ function into a blueprint function, hence being able to call your http request code from anywhere in blueprints.
You rock, thank you very much!!
thanks!
Will this work on ue4.26?
Yes
i wish this was done as a standalone class and not something built into the gamemode, I just want to figure out how to maek and use a c++ class
Sorry for the late response but I believe this can be done as a standalone class, doesn't have to be in the gamemode
I just came back to this video after a little break from UE and I am not really sure what I was asking in my parent question. I think what I meant more was getting an HTTP Request to happen in an already made gamemode such as Third or First person. I think the reason for this was because you create a "StartPlay()" function call so that you create a request when your game starts, since other game modes use blueprints its kind of hard to understand how to get this to happen since there is no "startplay()" function. @@Flopperam
i love you man !
i love you!!!!
Awesome
how to send file to api ?
Idk if unreal has that capability, but I also don't know the format of the file you're asking about.
@@Flopperam what ever the file , I have a pluggin that permit me to choose a file and i take its path then i cant find a way to send it to my CMS T.T
Actually I was wrong, it seems unreal does have this functionality, docs.unrealengine.com/4.27/en-US/API/Runtime/HTTP/Interfaces/IHttpRequest/. The IHttpRequest interface has a SetContentAsStreamedFile method that takes in a FString parameter representing the file name. docs.unrealengine.com/4.27/en-US/API/Runtime/HTTP/Interfaces/IHttpRequest/SetContentAsStreamedFile/
@@Flopperam its also in c++ ? Or is that blueprint ? ( Om working with VR on UE5)
C++
CTRLL-ALT-F11 doesnt do shiet (UE4.26.2)
Hey, I would suggest, in the editor, going to Edit > Editor Preferences > General > Keyboard Shortcuts and checking to see which keyboard shortcut combo handles toggling on/off full screen on the viewport.
it is F11 on Unreal 4.27 and I think 5 as-well.
Try CTRL+SHIFT+ALT+P
This is may causing some vulnerability.
🤌🤌🤌👌👌👌