buildUrl
fun buildUrl(baseUrl: String, authorization: Map<String, Any?>, payload: Map<String, Any?> = emptyMap()): String
Helper method that builds the final URL. It will append the authorization and payload arguments as query parameters. This method can be used for both the HTTP URL as well as the WebSocket URL
Example:
buildUrl(
baseUrl = "https://example1234567890000.appsync-realtime-api.us-east-1.amazonaws.com/graphql",
// This example uses an API key. See the AppSync documentation for information on what to pass
authorization = mapOf(
"host" to "example1234567890000.appsync-api.us-east-1.amazonaws.com",
"x-api-key" to "da2-12345678901234567890123456"
)
)
Content copied to clipboard
Parameters
baseUrl
The base web socket URL.
authorization
The authorization as per the AppSync documentation.
payload
An optional payload. Defaults to an empty object.