nghttp2_conn_submit_request =========================== Synopsis -------- *#include * .. function:: int64_t nghttp2_conn_submit_request( nghttp2_conn *conn, const nghttp2_nv *nva, size_t nvlen, const nghttp2_data_reader *dr, void *stream_user_data) `nghttp2_conn_submit_request` creates new stream and submits HTTP request header fields and the optional request body. Only client can submit HTTP request. *nva* of length *nvlen* specifies HTTP request header fields. *dr* specifies a request body. If there is no request body, specify ``NULL``. If *dr* is ``NULL``, it implies the end of stream. This function returns the stream ID if it succeeds. To know the stream ID before calling this function, use `nghttp2_conn_get_next_stream_id`. This function returns the stream ID that the new stream is designated with if it succeeds, or one of the following negative error codes: :macro:`NGHTTP2_ERR_NOMEM` Out of memory. :macro:`NGHTTP2_ERR_REFUSED_STREAM` Connection is shutting down, and no new stream is allowed. :macro:`NGHTTP2_ERR_STREAM_ID_BLOCKED` The remote endpoint does not allow *stream_id* yet.