Class: stcloud::TokensApiControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/stcloud/api/tokens_api_controller_api.rb,
lib/SematextCloud/api/tokens_api_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TokensApiControllerApi

Returns a new instance of TokensApiControllerApi.



16
17
18
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#create_app_token1(app_id, dto, opts = {}) ⇒ GenericApiResponse

Create new app token

Parameters:

  • app_id

    appId

  • dto

    dto

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



24
25
26
27
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 24

def create_app_token1(body, app_id, opts = {})
  data, _status_code, _headers = create_app_token1_with_http_info(body, app_id, opts)
  data
end

#create_app_token1_with_http_info(app_id, dto, opts = {}) ⇒ Array<(GenericApiResponse, Fixnum, Hash)>

Create new app token

Parameters:

  • app_id

    appId

  • dto

    dto

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GenericApiResponse, Fixnum, Hash)>)

    GenericApiResponse data, response status code and response headers



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 34

def create_app_token1_with_http_info(body, app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.create_app_token1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TokensApiControllerApi.create_app_token1"
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.create_app_token1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'TokenResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#create_app_token1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_app_token(app_id, token_id, opts = {}) ⇒ GenericMapBasedApiResponse

Delete app token

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



86
87
88
89
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 86

def delete_app_token(app_id, token_id, opts = {})
  data, _status_code, _headers = delete_app_token_with_http_info(app_id, token_id, opts)
  data
end

#delete_app_token1(app_id, token_id, opts = {}) ⇒ GenericApiResponse

Delete app token

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



85
86
87
88
# File 'lib/SematextCloud/api/tokens_api_controller_api.rb', line 85

def delete_app_token1(app_id, token_id, opts = {})
  data, _status_code, _headers = delete_app_token1_with_http_info(app_id, token_id, opts)
  data
end

#delete_app_token1_with_http_info(app_id, token_id, opts = {}) ⇒ Array<(GenericApiResponse, Fixnum, Hash)>

Delete app token

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GenericApiResponse, Fixnum, Hash)>)

    GenericApiResponse data, response status code and response headers



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/SematextCloud/api/tokens_api_controller_api.rb', line 95

def delete_app_token1_with_http_info(app_id, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.delete_app_token1 ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.delete_app_token1"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling TokensApiControllerApi.delete_app_token1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens/{tokenId}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'tokenId' + '}', token_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GenericApiResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#delete_app_token1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_app_token_with_http_info(app_id, token_id, opts = {}) ⇒ Array<(GenericMapBasedApiResponse, Integer, Hash)>

Delete app token

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GenericMapBasedApiResponse, Integer, Hash)>)

    GenericMapBasedApiResponse data, response status code and response headers



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 96

def delete_app_token_with_http_info(app_id, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.delete_app_token ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.delete_app_token"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling TokensApiControllerApi.delete_app_token"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens/{tokenId}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'tokenId' + '}', token_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GenericMapBasedApiResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#delete_app_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_app_tokens(app_id, opts = {}) ⇒ GenericApiResponse

Get app available tokens

Parameters:

  • app_id

    appId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



142
143
144
145
# File 'lib/SematextCloud/api/tokens_api_controller_api.rb', line 142

def get_app_tokens(app_id, opts = {})
  data, _status_code, _headers = get_app_tokens_with_http_info(app_id, opts)
  data
end

#get_app_tokens1(app_id, opts = {}) ⇒ TokensResponse

Get app available tokens

Parameters:

  • app_id

    appId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



145
146
147
148
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 145

def get_app_tokens1(app_id, opts = {})
  data, _status_code, _headers = get_app_tokens1_with_http_info(app_id, opts)
  data
end

#get_app_tokens1_with_http_info(app_id, opts = {}) ⇒ Array<(TokensResponse, Integer, Hash)>

Get app available tokens

Parameters:

  • app_id

    appId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TokensResponse, Integer, Hash)>)

    TokensResponse data, response status code and response headers



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 154

def get_app_tokens1_with_http_info(app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.get_app_tokens1 ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.get_app_tokens1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'TokensResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#get_app_tokens1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_app_tokens_with_http_info(app_id, opts = {}) ⇒ Array<(GenericApiResponse, Fixnum, Hash)>

Get app available tokens

Parameters:

  • app_id

    appId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GenericApiResponse, Fixnum, Hash)>)

    GenericApiResponse data, response status code and response headers



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/SematextCloud/api/tokens_api_controller_api.rb', line 151

def get_app_tokens_with_http_info(app_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.get_app_tokens ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.get_app_tokens"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens'.sub('{' + 'appId' + '}', app_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GenericApiResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#get_app_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#regenerate_app_token(app_id, token_id, opts = {}) ⇒ TokenResponse

Regenerate app token)

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



200
201
202
203
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 200

def regenerate_app_token(app_id, token_id, opts = {})
  data, _status_code, _headers = regenerate_app_token_with_http_info(app_id, token_id, opts)
  data
end

#regenerate_app_token1(app_id, token_id, opts = {}) ⇒ GenericApiResponse

Regenerate app token)

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



195
196
197
198
# File 'lib/SematextCloud/api/tokens_api_controller_api.rb', line 195

def regenerate_app_token1(app_id, token_id, opts = {})
  data, _status_code, _headers = regenerate_app_token1_with_http_info(app_id, token_id, opts)
  data
end

#regenerate_app_token1_with_http_info(app_id, token_id, opts = {}) ⇒ Array<(GenericApiResponse, Fixnum, Hash)>

Regenerate app token)

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GenericApiResponse, Fixnum, Hash)>)

    GenericApiResponse data, response status code and response headers



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/SematextCloud/api/tokens_api_controller_api.rb', line 205

def regenerate_app_token1_with_http_info(app_id, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.regenerate_app_token1 ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.regenerate_app_token1"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling TokensApiControllerApi.regenerate_app_token1"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens/{tokenId}/regenerate'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'tokenId' + '}', token_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GenericApiResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#regenerate_app_token1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#regenerate_app_token_with_http_info(app_id, token_id, opts = {}) ⇒ Array<(TokenResponse, Integer, Hash)>

Regenerate app token)

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TokenResponse, Integer, Hash)>)

    TokenResponse data, response status code and response headers



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 210

def regenerate_app_token_with_http_info(app_id, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.regenerate_app_token ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.regenerate_app_token"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling TokensApiControllerApi.regenerate_app_token"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens/{tokenId}/regenerate'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'tokenId' + '}', token_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'TokenResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#regenerate_app_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_app_token(app_id, token_id, dto, opts = {}) ⇒ GenericApiResponse

Update app token (enable/disable or name)

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • dto

    dto

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



261
262
263
264
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 261

def update_app_token(body, app_id, token_id, opts = {})
  data, _status_code, _headers = update_app_token_with_http_info(body, app_id, token_id, opts)
  data
end

#update_app_token_with_http_info(app_id, token_id, dto, opts = {}) ⇒ Array<(GenericApiResponse, Fixnum, Hash)>

Update app token (enable/disable or name)

Parameters:

  • app_id

    appId

  • token_id

    tokenId

  • dto

    dto

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GenericApiResponse, Fixnum, Hash)>)

    GenericApiResponse data, response status code and response headers



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
# File 'lib/stcloud/api/tokens_api_controller_api.rb', line 272

def update_app_token_with_http_info(body, app_id, token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TokensApiControllerApi.update_app_token ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling TokensApiControllerApi.update_app_token"
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TokensApiControllerApi.update_app_token"
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling TokensApiControllerApi.update_app_token"
  end
  # resource path
  local_var_path = '/users-web/api/v3/apps/{appId}/tokens/{tokenId}'.sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'tokenId' + '}', token_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'TokenResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TokensApiControllerApi#update_app_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end