/**************************************************************************/ /***************************** Agent 操作方法 ******************************/ /// <summary> /// 发送请求 /// </summary> /// <param name="connId"></param> /// <param name="method">请求方法</param> /// <param name="path">请求路径</param> /// <param name="headers">请求头</param> /// <param name="body">请求体</param> /// <returns></returns> public bool SendRequest(IntPtr connId, HttpMethod method, string path, THeader[] headers, byte[] body, int bodyLength) { int headersLength = headers == null ? 0 : headers.Length; return(HttpSdk.HP_HttpAgent_SendRequest(pAgent, connId, method.ToString(), path, headers, headersLength, body, bodyLength)); }