File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ The usage is pretty 'pythonic' and support both polling and evented approaches:
99from unreal_engine import IHttpRequest
1010import json
1111
12- request = IHttpRequest(' Get ' , ' http://httpbin.org/user-agent' )
12+ request = IHttpRequest(' GET ' , ' http://httpbin.org/user-agent' )
1313
1414def response_received (request , response , success ):
1515 data = json.loads(response.get_content_as_string())
@@ -21,3 +21,21 @@ request.bind_on_process_request_complete(response_received)
2121# run the request
2222request.process_request()
2323```
24+
25+ If you prefer the polling apparoach, you need to check for the get_status() return value (an int). In the C++ it is defined as:
26+
27+ ``` c++
28+ namespace EHttpRequestStatus
29+ {
30+ enum Type
31+ {
32+ NotStarted,
33+ Processing,
34+ Failed,
35+ Failed_ConnectionError,
36+ Succeeded,
37+ }
38+ }
39+ ```
40+
41+
You can’t perform that action at this time.
0 commit comments