could someone determine if checking contentType to determine RESTRequest is
sufficient?
org.apache.axis2.transport.http.HttpTransportUtils{
public static final String MEDIA_TYPE_APPLICATION_XML = "application/xml";
public static final String MEDIA_TYPE_X_WWW_FORM =
"application/x-www-form-urlencoded";
public static final String MEDIA_TYPE_MULTIPART_FORM_DATA =
"multipart/form-data";
public static boolean isRESTRequest(String contentType) {
return contentType != null &&
(contentType.indexOf(HTTPConstants.MEDIA_TYPE_APPLICATION_XML) >
-1 ||
contentType.indexOf(HTTPConstants.MEDIA_TYPE_X_WWW_FORM) > -1 ||
contentType.indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA) > -1);
}
}
some other projects are mapping REST based on URL parse(and not necessarily
contentType test)
does REST have a spec to follow and if so is there any parsing of URL to
determine if this is a REST request?
thanks,
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
interdite. Ce message sert à l'information seulement et n'aura pas n'importe
quel effet légalement obligatoire. Étant donné que les email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009