In my gradle dependencies, I've added:
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
And then I use Picasso normally, for example:
Picasso.with(context)
.load(url)
.placeholder(R.drawable.ic_contact_picture)
.error(R.drawable.ic_contact_picture)
.into(imageView);
Now, the url is a php script from which I'm doing echo file_get_contents("$imagepath");
The image is being fetched and displayed by picasso.
But before doing echo, I'm also setting some headers like:
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $lastModified)." GMT");
header("Etag: $etagFile");
header('Cache-Control: max-age=60');
Now, whenever picasso will consult okhttp, will okhttp send these headers with the http request? How can verify whether they are sent?