fix bug with the typo in the content-type

This commit is contained in:
yurecz 2019-12-11 10:58:20 +01:00
parent 981d8c2efa
commit 9a45f14f78

View file

@ -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)