Method
enum Method
Enum Items
HTTP verb OPTIONS
HTTP verb GET
HTTP verb POST
HTTP verb PUT
HTTP verb DELETE
HTTP verb HEAD
HTTP verb TRACE
HTTP verb CONNECT
HTTP verb PATCH
Implementions
Methods
[src]
pub fn is_safe(self): bool {
switch (self) {
case .Get:
return true;
case .Head:
return true;
case .Options:
return true;
case .Trace:
return true;
default:
return false;
}
}
Whether a method is considered "safe", meaning the request is essentially read-only.
[src]
pub fn is_safe(self): bool {
switch (self) {
case .Get:
return true;
case .Head:
return true;
case .Options:
return true;
case .Trace:
return true;
default:
return false;
}
}
Whether a method is considered "safe", meaning the request is essentially read-only.
Whether a method is considered "safe", meaning the request is essentially read-only.
is_idempotent
pub fn is_idempotent(self): bool
[src]
pub fn is_idempotent(self): bool {
switch (self) {
case .Put:
return true;
case .Delete:
return true;
default:
return self.is_safe();
}
}
Whether a method is considered "idempotent", meaning the request has the same result if executed multiple times.
is_idempotent
pub fn is_idempotent(self): bool
[src]
pub fn is_idempotent(self): bool {
switch (self) {
case .Put:
return true;
case .Delete:
return true;
default:
return self.is_safe();
}
}
Whether a method is considered "idempotent", meaning the request has the same result if executed multiple times.
Whether a method is considered "idempotent", meaning the request has the same result if executed multiple times.
[src]
pub fn to_string(self): string {
switch (self) {
case .Options:
return "OPTIONS";
case .Get:
return "GET";
case .Post:
return "POST";
case .Put:
return "PUT";
case .Delete:
return "DELETE";
case .Head:
return "HEAD";
case .Trace:
return "TRACE";
case .Connect:
return "CONNECT";
case .Patch:
return "PATCH";
}
}
[src]
pub fn to_string(self): string {
switch (self) {
case .Options:
return "OPTIONS";
case .Get:
return "GET";
case .Post:
return "POST";
case .Put:
return "PUT";
case .Delete:
return "DELETE";
case .Head:
return "HEAD";
case .Trace:
return "TRACE";
case .Connect:
return "CONNECT";
case .Patch:
return "PATCH";
}
}