This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------- | |
# STEP 1: install requirements | |
# ------------------------------------------------------- | |
# CentOS / RHEL / Amazon EC2 AMI: | |
# @see https://webtatic.com/packages/php70/ | |
sudo yum install php70w php70w-devel | |
sudo yum groupinstall "Development Tools" | |
sudo yum install libmemcached libmemcached-devel zlib zlib-devel | |
# ------------------------------------------------------- | |
# Debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CALL_API } from 'redux-api-middleware' | |
export function fetchLocations() { | |
return { | |
[CALL_API]: { | |
endpoint: 'http://api.somesite.com/api/locations', | |
method: 'GET', | |
// Don't have to manually add the Authorization header to every request. | |
headers: { 'Content-Type': 'application/json' }, | |
types: ['REQUEST', 'SUCCESS', 'FAILURE'] |