当前位置: 首页>>代码示例>>C++>>正文


C++ WiFly::print方法代码示例

本文整理汇总了C++中WiFly::print方法的典型用法代码示例。如果您正苦于以下问题:C++ WiFly::print方法的具体用法?C++ WiFly::print怎么用?C++ WiFly::print使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WiFly的用法示例。


在下文中一共展示了WiFly::print方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _headerStart

void JSONAPI::_headerStart (const char *method) {
  // If an old connection is active, close.
  if (wifly.isConnected()) {
    wifly.close();
  }

  if (!wifly.open(this->host, 80)) {
    Serial.println(F("Failed to connect to host."));
  }
  
  wifly.print(method);
  wifly.print(" ");
  // wifly.print("http://");
  // wifly.print(this->host);
}
开发者ID:dattasaurabh82,项目名称:arduino-lifegraph,代码行数:15,代码来源:Lifegraph.cpp

示例2: _headerEnd

void JSONAPI::_headerEnd () {
  wifly.println(" HTTP/1.1"); // paste your number here
  wifly.print("Host: ");
  wifly.println(this->host);
  wifly.println("User-Agent: lifegraph/0.0.1");
  if (this->hasBody) {
    wifly.println("Content-Type: application/x-www-form-urlencoded");
    wifly.println("Transfer-Encoding: chunked");
  }
  wifly.println();
}
开发者ID:dattasaurabh82,项目名称:arduino-lifegraph,代码行数:11,代码来源:Lifegraph.cpp

示例3: connect

int LifegraphAPI::connect (uint8_t uid[], int uidLength) {
  this->hasBody = false;
  this->_headerStart("GET");
  this->_headerPath("tokens");
  wifly.print("/");
  char token[3];
  for (int i = 0; i < uidLength; i++) {
    snprintf(token, 3, "%02x", uid[i]);
    wifly.print(token);
  }
  wifly.print("?namespace=");
  wifly.print(this->ns);
  wifly.print("&key=");
  wifly.print(this->key);
  wifly.print("&secret=");
  wifly.print(this->secret);
  this->_headerEnd();
  return this->request( NULL );
}
开发者ID:dattasaurabh82,项目名称:arduino-lifegraph,代码行数:19,代码来源:Lifegraph.cpp

示例4: _headerPath

void FacebookAPI::_headerPath (const char *path, const char *access_token) {
  wifly.print(this->base);
  wifly.print("/");
  wifly.print(path);
  if (access_token != 0) {
    wifly.print(strstr(path, "?") == 0 ? "?" : "&");
    wifly.print("access_token=");
    wifly.print(access_token);
  }
  wifly.print(strstr(path, "?") == 0 ? "?" : "&");
  wifly.print("namespace=");
  wifly.print(Lifegraph.ns);
  wifly.print("&key=");
  wifly.print(Lifegraph.key);
  wifly.print("&secret=");
  wifly.print(Lifegraph.secret);
}
开发者ID:dattasaurabh82,项目名称:arduino-lifegraph,代码行数:17,代码来源:Lifegraph.cpp


注:本文中的WiFly::print方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。