/** * This is used to determine if the content type is a form POST * of type application/x-www-form-urlencoded. Such a type is * used when a HTML form is used to post data to the server. * * @param type the type to determine if its a form post * * @return this returns true if content type is a form post */ private boolean isFormPost(ContentType type) { String primary = type.getPrimary(); String secondary = type.getSecondary(); if(!primary.equals(APPLICATION)) { return false; } return secondary.equals(URL_ENCODED); } }
/** * This is used to determine if the content type is a form POST * of type application/x-www-form-urlencoded. Such a type is * used when a HTML form is used to post data to the server. * * @param type the type to determine if its a form post * * @return this returns true if content type is a form post */ private boolean isFormPost(ContentType type) { String primary = type.getPrimary(); String secondary = type.getSecondary(); if(!primary.equals(APPLICATION)) { return false; } return secondary.equals(URL_ENCODED); } }
/** * This is used to determine if the content type is a form POST * of type application/x-www-form-urlencoded. Such a type is * used when a HTML form is used to post data to the server. * * @param type the type to determine if its a form post * * @return this returns true if content type is a form post */ private boolean isFormPost(ContentType type) { String primary = type.getPrimary(); String secondary = type.getSecondary(); if(!primary.equals(APPLICATION)) { return false; } return secondary.equals(URL_ENCODED); } }
/** * This is used to extract information from the HTTP header that * can be used to determine the type of the body. This will look * at the HTTP headers provided to find a specific token which * enables it to determine how to consume the body. * * @param segment this is the header associated with the body * * @return true if the content type is that of a multipart body */ protected boolean isUpload(Segment segment) { ContentType type = segment.getContentType(); if(type != null) { String token = type.getPrimary(); if(token.equals(MULTIPART)) { return true; } } return false; }
/** * This is used to extract information from the HTTP header that * can be used to determine the type of the body. This will look * at the HTTP headers provided to find a specific token which * enables it to determine how to consume the body. * * @param segment this is the header associated with the body * * @return true if the content type is that of a multipart body */ protected boolean isUpload(Segment segment) { ContentType type = segment.getContentType(); if(type != null) { String token = type.getPrimary(); if(token.equals(MULTIPART)) { return true; } } return false; }
/** * This is used to extract information from the HTTP header that * can be used to determine the type of the body. This will look * at the HTTP headers provided to find a specific token which * enables it to determine how to consume the body. * * @param segment this is the header associated with the body * * @return true if the content type is that of a multipart body */ protected boolean isUpload(Segment segment) { ContentType type = segment.getContentType(); if(type != null) { String token = type.getPrimary(); if(token.equals(MULTIPART)) { return true; } } return false; }