Bugfix for POST Ops not setting Content Length
Bugfix for POST Ops not setting Content Length

This patch sets the content length of the request or
else a chunked transfer is declared, and this corrupts
outgoing payloads. the content's length must be set prior
to the body being written per the spec at
https://golang.org/pkg/net/http

     If Body is present, Content-Length is <= 0 and
     TransferEncoding hasn't been set to "identity", Write
     adds "Transfer-Encoding: chunked" to the header. Body
     is closed after it is sent.

to that end a temporary buffer, b, is created to produce the
payload body, and then its size is used to set the request's
content length.

galaxie/go-swagger,kayla90/go-swagger,gaplyk/go-swagger,pieter-lazzaro/go-swagger,go-swagger/go-swagger,go-swagger/go-swagger,lhdomenech/go-swagger,lhdomenech/go-swagger,pieter-lazzaro/go-swagger,jakedsouza/go-swagger,nelz9999/go-swagger,kayla90/go-swagger,ThalesIgnite/go-swagger,galaxie/go-swagger,gaplyk/go-swagger,ThalesIgnite/go-swagger,jakedsouza/go-swagger,nelz9999/go-swagger