fix bug with the typo in the content-type
This commit is contained in:
parent
981d8c2efa
commit
9a45f14f78
1 changed files with 2 additions and 2 deletions
|
@ -40,9 +40,9 @@ func registerDevicesFromOrder(req *pb.PlaceOrderRequest, order *pb.OrderResult,
|
||||||
|
|
||||||
url := "https://hackathon-sap19-wal-1025.appspot.com/devices"
|
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 {
|
if httpError == nil {
|
||||||
httpRequest.Header.Set("Context-Type", "application/json")
|
httpRequest.Header.Set("Content-Type", "application/json")
|
||||||
httpClient := &http.Client{}
|
httpClient := &http.Client{}
|
||||||
|
|
||||||
log.Infof("Device registration, http request: %+v", httpRequest)
|
log.Infof("Device registration, http request: %+v", httpRequest)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue