take a photo via restful api by raspberry pi