EndpointRequest

public enum EndpointRequest

An HTTP Request for an Endpoint. This includes any associated data.

  • Helper method that creates the basic request for an endpoint.

    Declaration

    Swift

    public func createRequest(with token: DiscordToken,
                              endpoint: DiscordEndpoint) -> URLRequest?

    Parameters

    with

    A DiscordToken that will be used for authentication

    endpoint

    The endpoint this request is for

    Return Value

    a URLRequest that can be further customized