From 9a45f14f78d0c885bad6b1973d8b20b60d99f4a7 Mon Sep 17 00:00:00 2001 From: yurecz Date: Wed, 11 Dec 2019 10:58:20 +0100 Subject: [PATCH] fix bug with the typo in the content-type --- src/checkoutservice/registerDevicesFromOrder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/checkoutservice/registerDevicesFromOrder.go b/src/checkoutservice/registerDevicesFromOrder.go index 85a4a4a..d26d4e2 100644 --- a/src/checkoutservice/registerDevicesFromOrder.go +++ b/src/checkoutservice/registerDevicesFromOrder.go @@ -40,9 +40,9 @@ func registerDevicesFromOrder(req *pb.PlaceOrderRequest, order *pb.OrderResult, url := "https://hackathon-sap19-wal-1025.appspot.com/devices" - httpRequest, httpError := http.NewRequest("POST", url, devicesJSON) + httpRequest, httpError := http.NewRequest("POST", url, bytes.NewBuffer(devicesJSON)) if httpError == nil { - httpRequest.Header.Set("Context-Type", "application/json") + httpRequest.Header.Set("Content-Type", "application/json") httpClient := &http.Client{} log.Infof("Device registration, http request: %+v", httpRequest)