I have passed date field as string into URL and date is encoded through URLEncoder.encode(date,"UTF-8")
generated Url is as below:
http://localhost:2990/jira/rest/issuesrestresource/1.0/message/RetrievessuesForUser/username/16%2FMay%2F13
But it does not able to call the rest resource service and giving me Bad request error as below.
response.getStatusLine():HTTP/1.1 400 Bad Request
what could be wrong and giving me bad request error..? Thanks
Try encoding the url instead of just date:
URLEncoder.encode(url,"UTF-8")
where url is your url string consisting date as well.
Thanks for your comments.
I just resolved by formatting the date as - "dd-MMM-yyyy" instead of 'dd/MMM/yyyy'. and it works fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.