Creating a SNAPSHOT for RQM using REST API
Dear Team,
I have tried creating snapshot using REST API and SNAPSHOT as HTTP method in Postman/Rest client and its working fine and creating snapshots as expected. But how do I implement Non-standard/Custom HTTP method SNAPSHOT in java. How do I do create custom HTTP method SNAPSHOT and incorporate with http client. Is there any jar file that could do this for me ? I have Apache webdav for propfind method which is used to get the snapshots. Similarly,how do i implement for HTTP method SNAPSHOT.
In this document : https://jazz.net/wiki/bin/view/Main/RqmApi#Create_a_Snapshot , it says about Non-standard HTTP method requiring a HTTP client that support the HTTP
SNAPSHOT
method.
How do I implement this ?
Please help !
|
Accepted answer
Paul Slauenwhite (8.4k●1●2)
| answered Feb 04 '19, 6:25 a.m.
FORUM MODERATOR / JAZZ DEVELOPER edited Feb 04 '19, 7:33 a.m. This is more of a Java question rather than a RQM question.
You can override the HTTP method type for your HTTP client library and implement your own SNAPSHOT HTTP method type. For example (Apache Commons - org.apache.commons.httpclient.methods.EntityEnclosingMethod):
protected class SnapshotMethod extends EntityEnclosingMethod {
public SnapshotMethod(String uri) throws IllegalArgumentException, IllegalStateException {
super(uri);
}
@Override
public String getName() {
return "SNAPSHOT";
}
}
Ajith O M selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
Request Body :