Skip to content

Instantly share code, notes, and snippets.

View AnwarShahriar's full-sized avatar
🎱
Focusing

Md. Shahriar Anwar AnwarShahriar

🎱
Focusing
View GitHub Profile
@AnwarShahriar
AnwarShahriar / RetrofitCachingExample.java
Created February 25, 2016 06:43 — forked from swankjesse/RetrofitCachingExample.java
Demonstrate HTTP caching with OkHttp and Retrofit.
/*
* Copyright (C) 2013 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package net.colaborativa.exampleapp.api;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;