// Copyright (c) 2024 [mynameis@hajunho.com]. All rights reserved.
This plugin provides two methods for testing REST API functionality.
RESTAPI HJH Server Testing
Using the default provided server. I strive to keep the default server healthy at all times, but there may be instances when it's unavailable. This method tests the RESTAPI using a default server provided by the plugin.
- Create a new Blueprint in the Content Browser.
- In the Blueprint editor, search for the "RESTAPI HJH Server Testing" function when adding a node.
- Add this node to the graph and connect the execution pin.
- Input a float value as a parameter (this value is only output to the log and doesn't affect the server call).
- Compile and save the Blueprint.
- When you run the game or call the Blueprint in the editor, it will send a GET request to the default provided server (http://xxxxxxx:8000/howtotest/jjj). -> AWS Server has been down from now... will be moved to temporary server.
Make REST API Call (Using a custom server)
This method allows you to test the RESTAPI with a server address of your choice.
- Create a new Blueprint in the Content Browser.
- In the Blueprint editor, search for the "Make REST API Call" function when adding a node.
- Add this node to the graph and connect the execution pin.
- Input two string parameters to the function
- Url: The full URL of the server you want to test (e.g., "http://your-server.com/api/endpoint")
- Verb: The HTTP method ("GET" or "POST")
- Compile and save the Blueprint.
- When you run the game or call the Blueprint in the editor, it will send a request to the specified URL using the specified HTTP method.
Both methods will output the server response to the log. In the output log, you can check the following information.
- HTTP response code
- Response content type
- Response body
- If the response is JSON, the parsed JSON fields
This plugin is useful for quickly checking the status of RESTAPI servers. In the future, more RESTAPI-related features can be added, making it easier to test and debug communication with servers during game development.
'HJH IT Logs' 카테고리의 다른 글
중소기업 전략기술로드맵 4차 산업혁명 분야 (0) | 2024.08.25 |
---|---|
how to use ver002 (0) | 2024.08.25 |
몬스터 헌터 나우 신캐릭터 (0) | 2024.08.24 |
사회적 변화를 통해 바라본 베이비붐 세대와 현대 세대의 삶 (0) | 2024.08.18 |
양자 컴퓨터 (0) | 2024.08.16 |
최근댓글