| 328 | } |
| 329 | |
| 330 | apr_status_t md_http_POSTd_create(md_http_request_t **preq, md_http_t *http, const char *url, |
| 331 | struct apr_table_t *headers, const char *content_type, |
| 332 | const struct md_data_t *body) |
| 333 | { |
| 334 | md_http_request_t *req; |
| 335 | apr_status_t rv; |
| 336 | |
| 337 | rv = req_create(&req, http, "POST", url, headers); |
| 338 | if (APR_SUCCESS != rv) goto cleanup; |
| 339 | rv = req_set_body_data(req, content_type, body); |
| 340 | cleanup: |
| 341 | if (APR_SUCCESS == rv) { |
| 342 | *preq = req; |
| 343 | } |
| 344 | else { |
| 345 | *preq = NULL; |
| 346 | md_http_req_destroy(req); |
| 347 | } |
| 348 | return rv; |
| 349 | } |
| 350 | |
| 351 | apr_status_t md_http_GET_perform(struct md_http_t *http, |
| 352 | const char *url, struct apr_table_t *headers, |
no test coverage detected