Skip to content

Instantly share code, notes, and snippets.

@CuberL
CuberL / c
Created Apr 22, 2020
problem in tbox http client
View c
#include "tbox/tbox.h"
int main() {
tb_init(tb_null, tb_null);
int i = 10;
while (i --> 1) {
tb_http_ref_t http = tb_http_init();
tb_http_ctrl(http, TB_HTTP_OPTION_SET_COOKIES, tb_cookies());
tb_http_ctrl(http, TB_HTTP_OPTION_SET_METHOD, TB_HTTP_METHOD_GET);
tb_http_ctrl(http, TB_HTTP_OPTION_SET_URL, "http://google.com");
View config
AccessKeyId LTAIL****N6gpzW6
SignatureVersion 1.0
SignatureMethod HMAC-SHA1
Format JSON
Action SendSms
Version 2017-05-25
RegionId cn-hangzhou
SignName ****
TemplateCode ****
@CuberL
CuberL / method_factory.go
Created Mar 26, 2018
[方法工厂模式] 方法工厂模式 #golang #设计模式