Skip to content

Instantly share code, notes, and snippets.

@zhujunsan
Last active August 29, 2015 14:00
Show Gist options
  • Save zhujunsan/11283010 to your computer and use it in GitHub Desktop.
Save zhujunsan/11283010 to your computer and use it in GitHub Desktop.

Fade

临时文本缓存服务

存数据

Url:http://pi.nxtl.cn/fade/ 参数:

  • k,key,键名,最长不超过250个字符,必填
  • v,value,键值,最长不超过1M,必填
  • t,ttl,过期时间,以秒为单位,最长不超过7天

取数据

Url:http://pi.nxtl.cn/fade/ 参数:

  • k,key,键名,最长不超过250个字符,必填

额外参数

  • m,method,返回方式。
  • 默认为json返回,若m=plane时,返回纯文本。

Demo

###1 在Key:test1 中存入字符串:123 http://pi.nxtl.cn/fade/?k=test1&v=123

返回:

{
	code: 0,
	msg: "key set success"
}

###2 读取Key:test1 http://pi.nxtl.cn/fade/?k=test1

返回:

{
	code: 0,
	msg: "",
	value: "123"
}

###2 读取Key:test1 并以纯文本方式返回 http://pi.nxtl.cn/fade/?k=test1&m=plane

返回:

123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment