ConstReadonlyDelete: "DELETE"ReadonlyGet: "GET"ReadonlyPatch: "PATCH"ReadonlyPost: "POST"ReadonlyPut: "PUT"import { HttpMethod, PlatformServiceName } from '@limetech/lime-web-components';
const http = platform.get(PlatformServiceName.Http);
function sendUser(method: HttpMethod) {
const user = { name: 'Jane Smith', email: 'jane@example.com' };
if (method === HttpMethod.Put) {
return http.put('my_addon/users/123', user);
}
return http.post('my_addon/users', user);
}
const saved = await sendUser(HttpMethod.Put);
HTTP method constants
Standard HTTP methods as constant values. Useful for type-safe method selection in custom HTTP utilities.