apiPOST - Base call to Core ODATA REST API.
apiPOST(coreApi, resource = NULL, body = NULL, encode, headers = NULL, special = NULL, useVerbose = FALSE)
| coreApi | coreApi object with valid jsessionid |
|---|---|
| resource | entity type for POST |
| body | body for request |
| encode | encode type must be "multipart", "form", "json", "raw" |
| headers | headers to be added to get. |
| special | passed to buildUrl for special sdk endpoints |
| useVerbose | Use verbose communication for debugging |
Returns the entire http response
apiPOST Do a POST to the Core ODATA REST API.
# NOT RUN { api<-CoreAPI::CoreAPI("PATH TO JSON FILE") login<- CoreAPI::authBasic(api) response <-CoreAPI::apiPOST(login$coreApi,"SAMPLE",body,"json",special=NULL,useVerbose=FALSE) message <- httr::content(response) error <- httr::http_error(response) CoreAPI::logOut(login$coreApi ) # }