Skip to content

Commit ce5dfcc

Browse files
authored
Merge pull request #4 from G-Core/fix/3-add-support-for-options-method
Fix/3 add support for options method
2 parents 6ae31f4 + 735f099 commit ce5dfcc

File tree

6 files changed

+8
-1
lines changed

6 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "0.1.0"
2+
version = "0.1.1"
33
edition = "2021"
44

55
[workspace]

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# The FastEdge Rust SDK
2+
3+
The Rust SDK is used to build FastEdge applications in Rust.

fastedge-rust-sdk/src/backend.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ fn to_http_client_method(method: &::http::Method) -> Result<http_backend::Method
4848
&::http::Method::DELETE => http_backend::METHOD_DELETE,
4949
&::http::Method::HEAD => http_backend::METHOD_HEAD,
5050
&::http::Method::PATCH => http_backend::METHOD_PATCH,
51+
&::http::Method::OPTIONS => http_backend::METHOD_OPTIONS,
5152
method => return Err(Error::UnsupportedMethod(method.to_owned())),
5253
})
5354
}

fastedge-rust-sdk/src/http_client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ fn to_http_client_method(method: &::http::Method) -> Result<Method, Error> {
6868
&::http::Method::DELETE => Method::Delete,
6969
&::http::Method::HEAD => Method::Head,
7070
&::http::Method::PATCH => Method::Patch,
71+
&::http::Method::OPTIONS => Method::Options,
7172
method => return Err(Error::UnsupportedMethod(method.to_owned())),
7273
})
7374
}

fastedge-rust-sdk/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ impl From<Method> for ::http::Method {
143143
Method::Delete => ::http::Method::DELETE,
144144
Method::Head => ::http::Method::HEAD,
145145
Method::Patch => ::http::Method::PATCH,
146+
Method::Options => ::http::Method::OPTIONS,
146147
}
147148
}
148149
}

wit/http.wit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface http {
1111
delete,
1212
head,
1313
patch,
14+
options
1415
}
1516

1617
record request {

0 commit comments

Comments
 (0)