Think of a web app that displays a list of blog posts. The app only lists 10 items per page and shows a navigation with next
, previous
and direct links to each page. The app can fetch the posts for page 1 with posts_feed?types=https://blog.post&limit=10
. Page 2 can be shown by following the next
link of this request. But how is the app supposed to directly fetch posts for page 3 or higher?
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
==> Downloading http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.bz2 | |
Already downloaded: /Library/Caches/Homebrew/ruby-2.1.1.tar.bz2 | |
==> Verifying ruby-2.1.1.tar.bz2 checksum | |
tar xf /Library/Caches/Homebrew/ruby-2.1.1.tar.bz2 | |
==> ./configure --prefix=/usr/local/Cellar/ruby/2.1.1 --enable-shared --disable-silent-rules --with-out-ext=tk --disable-install-doc --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/openssl:/usr/local/opt/readline | |
checking build system type... x86_64-apple-darwin12.4.0 | |
checking host system type... x86_64-apple-darwin12.4.0 | |
checking target system type... x86_64-apple-darwin12.4.0 | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out |
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
var response = require('fs').readFileSync(__dirname + '/response.txt') | |
var http = require('http') | |
var parser = http.parsers.alloc() | |
parser.reinitialize(1) | |
parser.onHeaders = function() { | |
console.log('onHeader') | |
console.log(arguments) | |
} | |
parser.onHeadersComplete = function(headers) { |
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
var local = 'this is local to file1' | |
module.exports = 'this is exported by file1' |
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
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Router=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ | |
// shim for using process in browser | |
var process = module.exports = {}; | |
process.nextTick = (function () { | |
var canSetImmediate = typeof window !== 'undefined' | |
&& window.setImmediate; | |
var canPost = typeof window !== 'undefined' | |
&& window.postMessage && window.addEvent |
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
### Keybase proof | |
I hereby claim: | |
* I am hendrikcech on github. | |
* I am hendrikcech (https://keybase.io/hendrikcech) on keybase. | |
* I have a public key ASD3O68QVso4nsgFdtR_1DAT38zF1i8nxgNYEtx51FIE6go | |
To claim this, I am signing this object: |