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


C++ HttpServer::StartUp方法代码示例

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


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

示例1: main

int main() {
	HttpServer* httpserver = new HttpServer();

	httpserver->parse_json_str("src/ut/test.json");

	struct HttpRequest httprequest;

	httprequest.path = "/init_test";
	httpserver->processpost(1, &httprequest);

	httpserver->m_suite_name = "api3nonw3c";

	httprequest.path = "/check_server";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/check_server_status";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/shut_down_server";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/ask_next_step";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/init_session_id?session_id=1024";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/auto_test_task?session_id=1024";
	httprequest.content = "session_id=1024";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/manual_cases";
	httpserver->processpost(1, &httprequest);

	httprequest.content = "purpose=ut-cas&result=N/A";
	httprequest.path = "/commit_manual_result";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/check_execution_progress";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/generate_xml";
	httpserver->processpost(1, &httprequest);

	httprequest.content = "purpose=Verify setter of Uint16Array&result=N/A";
	httprequest.path = "/commit_result";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/check_execution_progress";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/set_capability";
	httprequest.content = "{\"name1\":true, \"name2\":45, \"name3\":\"678\"}";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/capability";
	httprequest.content = "name=name1";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/capability?name=name2&value=45";
	httprequest.content = "name=name2&value=45";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/capability?name=name3&value=678";
	httprequest.content = "name=name3&value=678";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/capability?name=name4";
	httprequest.content = "name=name4";
	httpserver->processpost(1, &httprequest);

	httprequest.path = "/set_capability";
	httprequest.content = "{\"bluetooth\":true, \"nfc\":true, \"multiTouchCount\":true, \"inputKeyboard\":true, \"wifi\":true, \"wifiDirect\":true, \"openglesVersion1_1\":true, \"openglesVersion2_0\":true, \"fmRadio\":true, \"platformVersion\":true, \"webApiVersion\":true, \"nativeApiVersion\":true, \"platformName\":true, \"cameraFront\":true, \"cameraFrontFlash\":true, \"cameraBack\":true, \"cameraBackFlash\":true, \"location\":true, \"locationGps\":true, \"locationWps\":true, \"microphone\":true, \"usbHost\":true, \"usbAccessory\":true, \"screenOutputRca\":true, \"screenOutputHdmi\":true, \"platformCoreCpuArch\":true, \"platformCoreFpuArch\":true, \"sipVoip\":true, \"duid\":true, \"speechRecognition\":true, \"accelerometer\":true, \"barometer\":true, \"gyroscope\":true, \"magnetometer\":true, \"proximity\":true}";
	httpserver->processpost(1, &httprequest);

	httpserver->StartUp();

	delete httpserver;

	return 0;
}
开发者ID:BruceDai,项目名称:testkit-stub,代码行数:81,代码来源:ut.cpp


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