This repository was archived by the owner on Dec 26, 2022. It is now read-only.
Commit 3640c56
feat(server): Implement microhttpd framework (#241)
* feat(server): Implement server core functions with microhttpd
* feat(server): Implement signal handler to terminate TA
- Add signal handler for SIGINT and SIGTERM
- Add logger when error occurred, starting and destroying TA
* feat(server): Implement URL parser
* Match request URL with regular expression
* Parse parameter to use with strtok
* feat(server): Implement generate_address API callback function
* feat(server): Implement find_txn_by_tag API callback function
* feat(server): Implement find_txn_obj_by_tag API callback function
* feat(server): Implement get_txn_obj API callback function
* feat(server): Implement get_tips_pair API callback function
* feat(server): Implement get_tips API callback function
* feat(server): Implement send_transfer API callback function
* feat(server): Implement recv_mam_msg API callback function
* feat(server): Implement send_mam_msg API callback function
* feat(server): Implement invalid path handling callback function
* feat(server): Implement OPTIONS request handling callback function
* feat(server): Implement send_trytes API callback function
* fix(server): Rename POST and OPTIONS flag
* fix: Refactor codelines to meet coding style
* feat(server): Implement req / res log message
* fix(server): Fix wrong url length in ta_get_url_parameter
* fix(api): Update find txn related apis (#237)
* fix(server): Check request body in POST api callback functions (#239)
If the GET request has the same url with the POST apis, it should return
a method_not_allowed response. Thus we should check if body is empty or not
in the callback functions before execution.
* fix(server): Modify error code switch case in set_response_content (#240)1 parent 38bbe7a commit 3640c56
5 files changed
Lines changed: 531 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
16 | 28 | | |
17 | 29 | | |
18 | 30 | | |
| |||
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
37 | 62 | | |
38 | 63 | | |
39 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
153 | 167 | | |
154 | 168 | | |
155 | 169 | | |
| |||
0 commit comments