Commit fd4cd6d6 authored by lain's avatar lain
Browse files

Prepare apiService for base url.

parent 2147807f
......@@ -15,6 +15,12 @@ const MEDIA_UPLOAD_URL = '/api/statusnet/media/upload'
// import { param, ajax } from 'jquery';
// import { merge } from 'lodash';
let fetch = (url, options) => {
const baseUrl = ''
const fullUrl = baseUrl + url
return window.fetch(fullUrl, options)
}
const authHeaders = (user) => {
if (user) {
return { 'Authorization': `Basic ${btoa(`${user.username}:${user.password}`)}` }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment