43 lines
842 B
Java
43 lines
842 B
Java
package org.gcube.lb2pc;
|
|
|
|
public class HttpRequest {
|
|
|
|
public HttpRequest() {
|
|
|
|
}
|
|
|
|
public String getHeader(String string) {
|
|
return null;
|
|
}
|
|
|
|
public String getRequestURI() {
|
|
return null;
|
|
}
|
|
|
|
public HttpMethod getMethod() {
|
|
return null;
|
|
}
|
|
|
|
public String getContent() {
|
|
// TODO Auto-generated method stub
|
|
return null;
|
|
}
|
|
|
|
public String getContentType() {
|
|
String contentType = "application/json";
|
|
if(this.getHeader("Content-Type")!=null) {
|
|
contentType = this.getHeader("Content-Type");
|
|
} else if(this.getHeader("Accept")!=null) {
|
|
contentType = selectBestContenType(this.getHeader("Accept"));
|
|
}
|
|
return contentType;
|
|
}
|
|
|
|
protected String getTransactionURI(HttpRequest request) {
|
|
return request.getHeader("X-Transaction-URI");
|
|
}
|
|
|
|
private String selectBestContenType(String header) {
|
|
return null;
|
|
}
|
|
} |