When an HttpRequest is built using a bodyless DiscordRequestBuilder for a PUT, it throws NullPointerException
Reproduction Steps
Perform a DiscordRequest that does not require a body and uses a PUT, such as "pin message"
Observe error logs
Expected behavior
When an HttpRequest for a PUT is built from a bodyless DiscordRequestBuilder, the object should build successfully and not throw NullPointerException
This can be achieved by adding .body(HttpRequest.BodyPublishers.noBody()) to all DiscordRequest::create implementations that lack a body and are used in a PUT
Acceptance Criteria
WHENHttpRequest::PUT is called
THEN a NullPointerException should not be thrown
Description of the Issue
When an
HttpRequest
is built using a bodylessDiscordRequestBuilder
for a PUT, it throwsNullPointerException
Reproduction Steps
DiscordRequest
that does not require a body and uses a PUT, such as "pin message"Expected behavior When an
HttpRequest
for a PUT is built from a bodylessDiscordRequestBuilder
, the object should build successfully and not throwNullPointerException
This can be achieved by adding.body(HttpRequest.BodyPublishers.noBody())
to allDiscordRequest::create
implementations that lack a body and are used in a PUTAcceptance Criteria
WHEN
HttpRequest::PUT
is called THEN aNullPointerException
should not be thrown