diff --git a/server_fn/src/codec/patch.rs b/server_fn/src/codec/patch.rs index 1e9e368ac..612f81f99 100644 --- a/server_fn/src/codec/patch.rs +++ b/server_fn/src/codec/patch.rs @@ -30,8 +30,8 @@ where })?; Request::try_new_patch_bytes( path, - accepts, Encoding::CONTENT_TYPE, + accepts, data, ) } diff --git a/server_fn/src/codec/post.rs b/server_fn/src/codec/post.rs index 924255a5a..e14682ee9 100644 --- a/server_fn/src/codec/post.rs +++ b/server_fn/src/codec/post.rs @@ -28,7 +28,7 @@ where let data = Encoding::encode(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_post_bytes(path, accepts, Encoding::CONTENT_TYPE, data) + Request::try_new_post_bytes(path, Encoding::CONTENT_TYPE, accepts, data) } } diff --git a/server_fn/src/codec/put.rs b/server_fn/src/codec/put.rs index 2b2e65567..4fe064d47 100644 --- a/server_fn/src/codec/put.rs +++ b/server_fn/src/codec/put.rs @@ -28,7 +28,7 @@ where let data = Encoding::encode(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_put_bytes(path, accepts, Encoding::CONTENT_TYPE, data) + Request::try_new_put_bytes(path, Encoding::CONTENT_TYPE, accepts, data) } } diff --git a/server_fn/src/codec/url.rs b/server_fn/src/codec/url.rs index dd2212bda..126384a9d 100644 --- a/server_fn/src/codec/url.rs +++ b/server_fn/src/codec/url.rs @@ -46,7 +46,7 @@ where let data = serde_qs::to_string(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_get(path, accepts, GetUrl::CONTENT_TYPE, &data) + Request::try_new_get(path, GetUrl::CONTENT_TYPE, accepts, &data) } } @@ -85,7 +85,7 @@ where let qs = serde_qs::to_string(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_post(path, accepts, PostUrl::CONTENT_TYPE, qs) + Request::try_new_post(path, PostUrl::CONTENT_TYPE, accepts, qs) } } @@ -124,7 +124,7 @@ where let data = serde_qs::to_string(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_delete(path, accepts, GetUrl::CONTENT_TYPE, &data) + Request::try_new_delete(path, DeleteUrl::CONTENT_TYPE, accepts, &data) } } @@ -163,7 +163,7 @@ where let data = serde_qs::to_string(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_patch(path, accepts, GetUrl::CONTENT_TYPE, data) + Request::try_new_patch(path, PatchUrl::CONTENT_TYPE, accepts, data) } } @@ -202,7 +202,7 @@ where let data = serde_qs::to_string(&self).map_err(|e| { ServerFnErrorErr::Serialization(e.to_string()).into_app_error() })?; - Request::try_new_put(path, accepts, GetUrl::CONTENT_TYPE, data) + Request::try_new_put(path, PutUrl::CONTENT_TYPE, accepts, data) } }