Fix PUT request.
This commit is contained in:
@@ -138,7 +138,8 @@ int exec_request(const char *request, const char *path, int expected_code, const
|
|||||||
}
|
}
|
||||||
else if (strcmp(request, kput_method) == 0)
|
else if (strcmp(request, kput_method) == 0)
|
||||||
{
|
{
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_UPLOAD, 1L);
|
curl_easy_setopt(curl_handle, CURLOPT_HTTPGET, 0);
|
||||||
|
curl_easy_setopt(curl_handle, CURLOPT_CUSTOMREQUEST, kput_method);
|
||||||
}
|
}
|
||||||
else if (strcmp(request, kpost_method) == 0)
|
else if (strcmp(request, kpost_method) == 0)
|
||||||
{
|
{
|
||||||
@@ -429,7 +430,7 @@ TEST("Rest - create start access rest hook free\t")
|
|||||||
ret = exec_request(kdelete_method, "http://localhost:"kserver_port kapi_test_get, 200, ksuccess_delete_body);
|
ret = exec_request(kdelete_method, "http://localhost:"kserver_port kapi_test_get, 200, ksuccess_delete_body);
|
||||||
ASSERT_EQUAL_INT(ret, 0);
|
ASSERT_EQUAL_INT(ret, 0);
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
PRINTLN("\n - PUT");
|
PRINTLN("\n - PUT");
|
||||||
ret = exec_request(kput_method, "http://localhost:"kserver_port kapi_test_get, 200, ksuccess_put_body);
|
ret = exec_request(kput_method, "http://localhost:"kserver_port kapi_test_get, 200, ksuccess_put_body);
|
||||||
ASSERT_EQUAL_INT(ret, 0);
|
ASSERT_EQUAL_INT(ret, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user