Closed
Description
Hi Team,
I am using pyodata to batch upsert data into SuccessFactors OData API.
batch_req = sf_odata_service.create_batch()
change set = sf_odata_service.create_changeset()
cc_data = {
"name_en_US": "Test",
"description_en_US": "Test",
"startDate": "/Date(-220898800000)/"
}
change_set.add_request(sf_odata_service.entity_sets.FOCostCenter.create_entity().set(**cc_data))
cc_data = {
"name_en_US": "Dummy",
"description_en_US": "Dummy",
"startDate": "/Date(-220898800000)/"
}
change_set.add_request(sf_odata_service.entity_sets.FOCostCenter.create_entity().set(**cc_data))
batch_req.add_request(change_set)
batch_req.execute()
The above code is throwing Missing Boundary delimiter at line '4'.
I printed the body of the request.
--batch_3041_8524_1030
Content-Type: multipart/mixed;boundary=changeset_6522_8586_6718
--changeset_6522_8586_6718
Content-Type: application/http
Content-Transfer-Encoding:binary
POST FOCostCenter HTTP/1.1
Accept: application/json
Content-Type: application/json
X-Requested-With: X
{"startDate": "/Date(-2208988800000)/", "externalCode": "Dummy", "name_en_US": "Dummy", "name_defaultValue": "Dummy", "description_en_US": "", "description_defaultValue": "", "status": "A", "costcenterExternalObjectID": ""}
--changeset_6522_8586_6718
Content-Type: application/http
Content-Transfer-Encoding:binary
POST FOCostCenter HTTP/1.1
Accept: application/json
Content-Type: application/json
X-Requested-With: X
{"startDate": "/Date(1720656000000)/", "externalCode": "Test", "name_en_US": "Test", "name_defaultValue": "Test", "description_en_US": "", "description_defaultValue": "", "status": "A", "costcenterExternalObjectID": ""}
--changeset_6522_8586_6718--
--batch_3041_8524_1030
I see an extra space added after the Content-Type. Not sure where the issue is from myside. Any help is greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels