Skip to content

Commit

Permalink
Merge pull request #26 from Comcast/patch/JSONToMsgPack
Browse files Browse the repository at this point in the history
Change encoding format of request to scytale
  • Loading branch information
schmidtw authored Nov 11, 2017
2 parents 4109b45 + ba72026 commit f369d2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tr1d1um/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (ch *ConversionHandler) ServeHTTP(origin http.ResponseWriter, req *http.Req
origin.Header().Set(HeaderWPATID, wrpMsg.TransactionUUID)

var wrpPayloadBuffer bytes.Buffer
err = wrp.NewEncoder(&wrpPayloadBuffer, wrp.JSON).Encode(wrpMsg)
err = wrp.NewEncoder(&wrpPayloadBuffer, wrp.Msgpack).Encode(wrpMsg)

if err != nil {
origin.WriteHeader(http.StatusInternalServerError)
Expand All @@ -119,7 +119,7 @@ func (ch *ConversionHandler) ServeHTTP(origin http.ResponseWriter, req *http.Req
body: wrpPayloadBuffer.Bytes(),
}
//
tr1Request.headers.Set("Content-Type", wrp.JSON.ContentType())
tr1Request.headers.Set("Content-Type", wrp.Msgpack.ContentType())
tr1Request.headers.Set("Authorization", req.Header.Get("Authorization"))

tr1Resp, err := ch.Execute(ch.Sender.MakeRequest, tr1Request)
Expand Down

0 comments on commit f369d2d

Please sign in to comment.