Skip to content

Commit 4ce743d

Browse files
committed
feat: adjusting http request send function
1 parent 15764c7 commit 4ce743d

3 files changed

Lines changed: 164 additions & 18 deletions

File tree

definitions/taurus/http/data_types/http_payload.proto.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
],
2121
"genericKeys": ["T"],
2222
"type": "T extends 'application/json' ? OBJECT<{}> : T extends undefined ? undefined : string",
23-
"linkedDataTypeIdentifiers": [],
23+
"linkedDataTypeIdentifiers": ["OBJECT"],
2424
"rules": []
2525
}

definitions/taurus/http/functions/http_request_send.proto.json

Lines changed: 82 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,86 @@
2020
"documentation": []
2121
},
2222
{
23-
"runtimeName": "headers",
23+
"runtimeName": "url",
2424
"defaultValue": null,
2525
"name": [
2626
{
2727
"code": "en-US",
28-
"content": "HTTP Headers"
28+
"content": "Request URL"
2929
}
3030
],
3131
"description": [
3232
{
3333
"code": "en-US",
34-
"content": "A collection of key-value pairs containing additional request metadata."
34+
"content": "Specifies the endpoint address, including protocol, host, path, and query parameters, where the request is directed."
3535
}
3636
],
3737
"documentation": []
3838
},
3939
{
40-
"runtimeName": "url",
40+
"runtimeName": "http_auth",
4141
"defaultValue": null,
4242
"name": [
4343
{
4444
"code": "en-US",
45-
"content": "Request URL"
45+
"content": "Auth Type"
4646
}
4747
],
4848
"description": [
4949
{
5050
"code": "en-US",
51-
"content": "Specifies the endpoint address, including protocol, host, path, and query parameters, where the request is directed."
51+
"content": "Specifies the authentication variant to use, such as Bearer, Basic, X-API-Key, or a custom scheme. Use undefined to send the request without authentication."
52+
}
53+
],
54+
"documentation": []
55+
},
56+
{
57+
"runtimeName": "http_auth_value",
58+
"defaultValue": null,
59+
"name": [
60+
{
61+
"code": "en-US",
62+
"content": "Auth Value"
63+
}
64+
],
65+
"description": [
66+
{
67+
"code": "en-US",
68+
"content": "Provides the credentials for the selected authentication type. For Basic auth, supply an object with username and password; for all other types, provide a token or key string."
69+
}
70+
],
71+
"documentation": []
72+
},
73+
{
74+
"runtimeName": "http_auth_place",
75+
"defaultValue": null,
76+
"name": [
77+
{
78+
"code": "en-US",
79+
"content": "Auth Placement"
80+
}
81+
],
82+
"description": [
83+
{
84+
"code": "en-US",
85+
"content": "Defines where the authentication credentials are attached to the request. Bearer and Basic auth always use Header; custom schemes can be placed in the Header or as a URL query parameter."
86+
}
87+
],
88+
"documentation": []
89+
},
90+
{
91+
"runtimeName": "http_schema",
92+
"defaultValue": null,
93+
"name": [
94+
{
95+
"code": "en-US",
96+
"content": "Content Type"
97+
}
98+
],
99+
"description": [
100+
{
101+
"code": "en-US",
102+
"content": "Specifies the MIME type of the request payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
52103
}
53104
],
54105
"documentation": []
@@ -65,7 +116,24 @@
65116
"description": [
66117
{
67118
"code": "en-US",
68-
"content": "Contains the request payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
119+
"content": "Contains the request payload. For application/json the value must be an OBJECT, for all other content types a plain string is expected."
120+
}
121+
],
122+
"documentation": []
123+
},
124+
{
125+
"runtimeName": "headers",
126+
"defaultValue": null,
127+
"name": [
128+
{
129+
"code": "en-US",
130+
"content": "HTTP Headers"
131+
}
132+
],
133+
"description": [
134+
{
135+
"code": "en-US",
136+
"content": "An optional collection of key-value pairs containing additional request metadata such as custom headers."
69137
}
70138
],
71139
"documentation": []
@@ -99,11 +167,16 @@
99167
],
100168
"deprecationMessage": [],
101169
"displayIcon": "tabler:world-www",
102-
"signature": "<T>(http_method: HTTP_METHOD, headers: OBJECT<{}>, url: HTTP_URL, payload: T): HTTP_RESPONSE<any>",
170+
"signature": "<A extends HTTP_AUTH_TYPE, S extends HTTP_SCHEMA>(http_method: HTTP_METHOD, url: HTTP_URL, http_auth: A, http_auth_value: HTTP_AUTH_VALUE<A>, http_auth_place: HTTP_AUTH_PLACE<A>, http_schema: S, payload: HTTP_PAYLOAD<S>, headers?: OBJECT<{}>): HTTP_RESPONSE<any>",
103171
"linkedDataTypeIdentifiers": [
104172
"HTTP_METHOD",
105-
"OBJECT",
106173
"HTTP_URL",
174+
"HTTP_AUTH_TYPE",
175+
"HTTP_AUTH_VALUE",
176+
"HTTP_AUTH_PLACE",
177+
"HTTP_SCHEMA",
178+
"HTTP_PAYLOAD",
179+
"OBJECT",
107180
"HTTP_RESPONSE"
108181
]
109182
}

definitions/taurus/http/runtime_functions/http_request_send.proto.json

Lines changed: 81 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,86 @@
1919
"documentation": []
2020
},
2121
{
22-
"runtimeName": "headers",
22+
"runtimeName": "url",
2323
"defaultValue": null,
2424
"name": [
2525
{
2626
"code": "en-US",
27-
"content": "HTTP Headers"
27+
"content": "Request URL"
2828
}
2929
],
3030
"description": [
3131
{
3232
"code": "en-US",
33-
"content": "A collection of key-value pairs containing additional request metadata."
33+
"content": "Specifies the endpoint address, including protocol, host, path, and query parameters, where the request is directed."
3434
}
3535
],
3636
"documentation": []
3737
},
3838
{
39-
"runtimeName": "url",
39+
"runtimeName": "http_auth",
4040
"defaultValue": null,
4141
"name": [
4242
{
4343
"code": "en-US",
44-
"content": "Request URL"
44+
"content": "Auth Type"
4545
}
4646
],
4747
"description": [
4848
{
4949
"code": "en-US",
50-
"content": "Specifies the endpoint address, including protocol, host, path, and query parameters, where the request is directed."
50+
"content": "Specifies the authentication variant to use, such as Bearer, Basic, X-API-Key, or a custom scheme. Use undefined to send the request without authentication."
51+
}
52+
],
53+
"documentation": []
54+
},
55+
{
56+
"runtimeName": "http_auth_value",
57+
"defaultValue": null,
58+
"name": [
59+
{
60+
"code": "en-US",
61+
"content": "Auth Value"
62+
}
63+
],
64+
"description": [
65+
{
66+
"code": "en-US",
67+
"content": "Provides the credentials for the selected authentication type. For Basic auth, supply an object with username and password; for all other types, provide a token or key string."
68+
}
69+
],
70+
"documentation": []
71+
},
72+
{
73+
"runtimeName": "http_auth_place",
74+
"defaultValue": null,
75+
"name": [
76+
{
77+
"code": "en-US",
78+
"content": "Auth Placement"
79+
}
80+
],
81+
"description": [
82+
{
83+
"code": "en-US",
84+
"content": "Defines where the authentication credentials are attached to the request. Bearer and Basic auth always use Header; custom schemes can be placed in the Header or as a URL query parameter."
85+
}
86+
],
87+
"documentation": []
88+
},
89+
{
90+
"runtimeName": "http_schema",
91+
"defaultValue": null,
92+
"name": [
93+
{
94+
"code": "en-US",
95+
"content": "Content Type"
96+
}
97+
],
98+
"description": [
99+
{
100+
"code": "en-US",
101+
"content": "Specifies the MIME type of the request payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."
51102
}
52103
],
53104
"documentation": []
@@ -64,7 +115,24 @@
64115
"description": [
65116
{
66117
"code": "en-US",
67-
"content": "Contains the request payload, such as JSON, XML, form data, or binary content, depending on the Content-Type header."
118+
"content": "Contains the request payload. For application/json the value must be an OBJECT, for all other content types a plain string is expected."
119+
}
120+
],
121+
"documentation": []
122+
},
123+
{
124+
"runtimeName": "headers",
125+
"defaultValue": null,
126+
"name": [
127+
{
128+
"code": "en-US",
129+
"content": "HTTP Headers"
130+
}
131+
],
132+
"description": [
133+
{
134+
"code": "en-US",
135+
"content": "An optional collection of key-value pairs containing additional request metadata such as custom headers."
68136
}
69137
],
70138
"documentation": []
@@ -101,8 +169,13 @@
101169
"signature": "<A extends HTTP_AUTH_TYPE, S extends HTTP_SCHEMA>(http_method: HTTP_METHOD, url: HTTP_URL, http_auth: A, http_auth_value: HTTP_AUTH_VALUE<A>, http_auth_place: HTTP_AUTH_PLACE<A>, http_schema: S, payload: HTTP_PAYLOAD<S>, headers?: OBJECT<{}>): HTTP_RESPONSE<any>",
102170
"linkedDataTypeIdentifiers": [
103171
"HTTP_METHOD",
104-
"OBJECT",
105172
"HTTP_URL",
173+
"HTTP_AUTH_TYPE",
174+
"HTTP_AUTH_VALUE",
175+
"HTTP_AUTH_PLACE",
176+
"HTTP_SCHEMA",
177+
"HTTP_PAYLOAD",
178+
"OBJECT",
106179
"HTTP_RESPONSE"
107180
]
108181
}

0 commit comments

Comments
 (0)