Content-Length was ommitted for certain put requests, e.g;
Guild.AddGuildMemberRole(...)
Content-Length is now a default set to 0 by default (This is overridden if data != null)
Discord API was returning an error complaining about Content-Length not being set for any Request MethodType != GET.
Even if the payload was empty, the API still wanted to know through a header. If data == null, the WriteRequestData method would never set Content-Length to 0.
Also changed WriteRequestData to start using the object param instead of instance field. OCD was ticking..
Content-Length was ommitted for certain put requests, e.g; Guild.AddGuildMemberRole(...)
Content-Length is now a default set to 0 by default (This is overridden if data != null)
Discord API was returning an error complaining about Content-Length not being set for any Request MethodType != GET. Even if the payload was empty, the API still wanted to know through a header. If data == null, the WriteRequestData method would never set Content-Length to 0.
Also changed WriteRequestData to start using the object param instead of instance field. OCD was ticking..