File tree Expand file tree Collapse file tree 1 file changed +45
-1
lines changed
Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change 4545 function request ( options : HttpRequestOptions ) : promises . Promise < HttpResponse > ;
4646
4747 interface HttpRequestOptions {
48+ /**
49+ * Gets or sets the request url.
50+ */
4851 url : string ;
52+
53+ /**
54+ * Gets or sets the request method.
55+ */
4956 method : string ;
57+
58+ /**
59+ * Gets or sets the request headers in JSON format.
60+ */
5061 headers ?: any ;
62+
63+ /**
64+ * Gets or sets the request body.
65+ */
5166 content ?: any ;
67+
68+ /**
69+ * Gets or sets the request timeout.
70+ */
5271 timeout ?: number ;
5372 }
5473
5574 interface HttpResponse {
75+ /**
76+ * Gets the response status code.
77+ */
5678 statusCode : number ;
79+
80+ /**
81+ * Gets the response headers.
82+ */
5783 headers : any ;
84+
85+ /**
86+ * Gets the response content.
87+ */
5888 content ?: HttpContent ;
5989 }
6090
6191 interface HttpContent {
92+ /**
93+ * Gets the response body as raw data.
94+ */
6295 raw : any ;
96+
97+ /**
98+ * Gets the response body as string.
99+ */
63100 toString : ( ) => string ;
64- // TODO: Isn't parseJSON better naming? toJSON sounds to me like we will return a string object
101+
102+ /**
103+ * Gets the response body as JSON object.
104+ */
65105 toJSON : ( ) => any ;
106+
107+ /**
108+ * Gets the response body as ImageSource.
109+ */
66110 toImage : ( ) => image . ImageSource ;
67111 }
68112}
You can’t perform that action at this time.
0 commit comments