Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

[BUG] ETRestConnection , PATCH method not working #112

Open
4 tasks
nagendra0506 opened this issue Dec 1, 2019 · 0 comments
Open
4 tasks

[BUG] ETRestConnection , PATCH method not working #112

nagendra0506 opened this issue Dec 1, 2019 · 0 comments
Labels

Comments

@nagendra0506
Copy link

nagendra0506 commented Dec 1, 2019

Describe the bug
Im trying to update the data extension records using ETRestConnection, PATCH method.

Its returning the method not support error because of request method type PATCH not supported by salesforce marketing cloud async rest API, it should be PUT.

To Reproduce
try to use client.getRestConnection().patch method.

Expected behavior
it should update the data extension records

Screenshots
If applicable, add screenshots to help explain your problem.

Code snippet
public Response patch(String path, String payload)
throws ETSdkException
{
HttpURLConnection connection = null;
try {
Response response = new Response();
connection = sendRequest(path, Method.PATCH, payload);
String json = receiveResponse(connection);
response.setRequestId(connection.getHeaderField("X-Mashery-Message-ID"));
response.setResponseCode(connection.getResponseCode());
response.setResponseMessage(connection.getResponseMessage());
response.setResponsePayload(json);
return response;
} catch (IOException ex) {
throw new ETSdkException(ex);
} finally {
if (connection != null) {
connection.disconnect();
}
}
}

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (e.g. gif) is not sufficient.

Environment

  • SDK Version [e.g. 1.1.0]
  • Java/ JDK version

The bug has the severity

  • Critical: The defect affects critical functionality or critical data. It does not have a workaround.
  • Major: The defect affects major functionality or major data. It has a workaround but is not obvious and is difficult.
  • Minor: The defect affects minor functionality or non-critical data. It has an easy workaround.
  • Trivial: The defect does not affect functionality or data. It does not even need a workaround. It does not impact productivity or efficiency. It is merely an inconvenience.

Additional context
Add any other context about the problem here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant