adapted for oAuth. Needs tests
basic blob uri encoding stuff