Skip to content

Commit

Permalink
remove debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
jbowles committed May 22, 2018
1 parent 7f69725 commit 5d5bba8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions hotelws/hotel_rate_desc_rq.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ type HotelRateDescResponse struct {
func CallHotelRateDesc(serviceURL string, req HotelRateDescRequest) (HotelRateDescResponse, error) {
propResp := HotelRateDescResponse{}
byteReq, _ := xml.Marshal(req)
//fmt.Printf("REQ: \n\n %s \n\n", byteReq)

//post payload
resp, err := http.Post(serviceURL, "text/xml", bytes.NewBuffer(byteReq))
Expand All @@ -121,11 +120,9 @@ func CallHotelRateDesc(serviceURL string, req HotelRateDescRequest) (HotelRateDe
// parse payload body into []byte buffer from net Response.ReadCloser
// ioutil.ReadAll(resp.Body) has no cap on size and can create memory problems
bodyBuffer := new(bytes.Buffer)
//fmt.Printf("8888888888888888\n\n %v \n\n", resp)
io.Copy(bodyBuffer, resp.Body)
resp.Body.Close()

//fmt.Printf("----------------\n\n %s \n\n", bodyBuffer.Bytes())
//marshal bytes sabre response body into availResp response struct
err = xml.Unmarshal(bodyBuffer.Bytes(), &propResp)
if err != nil {
Expand Down

0 comments on commit 5d5bba8

Please sign in to comment.