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
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";
}
}
Comments
Ajith O M
Feb 04 '19, 1:01 a.m.Request Body :