Skip to content

Commit 33313c4

Browse files
author
Roberto De Ioris
authored
Create Http_API.md
1 parent 6b017f8 commit 33313c4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/Http_API.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The HTTP API
2+
-
3+
4+
The IHttpRequest and IHttpResponse interfaces are exposed as Python classes (both inheriting from IHttpBase)
5+
6+
The usage is pretty 'pythonic' and support both polling and evented approaches:
7+
8+
```python
9+
from unreal_engine import IHttpRequest
10+
import json
11+
12+
request = IHttpRequest('Get', 'http://httpbin.org/user-agent')
13+
request.process_request()
14+
15+
response = request.get_response()
16+
17+
data = json.loads(response.get_content_as_string())
18+
19+
ue.log(data)
20+
```

0 commit comments

Comments
 (0)