vertx / io.vertx.kotlin.ext.auth.oauth2 / io.vertx.ext.auth.oauth2.AccessToken / fetchAwait

# fetchAwait

`suspend fun AccessToken.fetchAwait(resource: String): OAuth2Response`

Fetches a JSON resource using this Access Token.

### Parameters

`resource` -

- the resource to fetch.

`callback` -

- The callback function returning the results.

Return

`suspend fun AccessToken.fetchAwait(method: HttpMethod, resource: String, headers: JsonObject, payload: Buffer): OAuth2Response`

Fetches a JSON resource using this Access Token.

### Parameters

`method` -

- the HTTP method to user.

`resource` -

- the resource to fetch.

`headers` -

- extra headers to pass to the request.

`payload` -

- payload to send to the server.

`callback` -

- The callback function returning the results.

Return