Class HttpRequestEvent

  • All Implemented Interfaces:
    GenericEvent

    public class HttpRequestEvent
    extends Event
    Indicates that a RestAction has been executed.

    Depending on the request and its result not all values have to be populated.

    • Constructor Detail

      • HttpRequestEvent

        public HttpRequestEvent​(@Nonnull
                                Request<?> request,
                                @Nonnull
                                Response response)
    • Method Detail

      • getRequest

        @Nonnull
        public Request<?> getRequest()
      • getRequestBody

        @Nullable
        public RequestBody getRequestBody()
      • getRequestBodyRaw

        @Nullable
        public java.lang.Object getRequestBodyRaw()
      • getRequestHeaders

        @Nullable
        public Headers getRequestHeaders()
      • getRequestRaw

        @Nullable
        public Request getRequestRaw()
      • getResponse

        @Nullable
        public Response getResponse()
      • getResponseBody

        @Nullable
        public ResponseBody getResponseBody()
      • getResponseBodyAsArray

        @Nullable
        public DataArray getResponseBodyAsArray()
      • getResponseBodyAsObject

        @Nullable
        public DataObject getResponseBodyAsObject()
      • getResponseBodyAsString

        @Nullable
        public java.lang.String getResponseBodyAsString()
      • getResponseHeaders

        @Nullable
        public Headers getResponseHeaders()
      • getResponseRaw

        @Nullable
        public Response getResponseRaw()
      • getCFRays

        @Nonnull
        public java.util.Set<java.lang.String> getCFRays()
      • getRestAction

        @Nonnull
        public RestAction<?> getRestAction()
      • getRoute

        @Nonnull
        public net.dv8tion.jda.internal.requests.Route.CompiledRoute getRoute()
      • isRateLimit

        public boolean isRateLimit()