Performs an authenticated PATCH request to the API using the settings of the RESTDataConnector
The default headers from the RESTDataConnector are included in the request.
Any additional headers, as specified by the parameter, will be merged.
var playlist = {"playlist_name": "My Favourite Songs", "paylist-genre": "rock",
.....
var headers = {"Content-Type":"application/json", "Accept":"application/json"};
var auth = HttpAuthentication.createOAuthAuthentication("connectorauth");
var opts = new RestOptions();
opts.setSocketTimeout(60);
var dc = connectors.createRESTDataConnector('https://myserviceconnector.org/jukebox');
var response = dc.patch(dc.createUri('/playlist'), playlist, {headers: headers, options: opts, authentication: auth});
log(response.playlist_id);
Further documentation.
JavaScript example: