updating documentation

This commit is contained in:
Deepankar Dixit
2022-05-26 12:33:57 -04:00
parent ddda85f83b
commit 495a831216

View File

@@ -140,7 +140,7 @@ curl https://REGION-PROJECT_ID.cloudfunctions.net/function-sample-gcp-http -d "h
Setting custom HTTP statusCode:
----
Users can specify the response statusCode that they want to set by wrapping "statusCode" in headers. This constant is available to users by calling `FunctionInvoker.HTTP_STATUS_CODE`
Functions can specify a custom HTTP response code by setting the `FunctionInvoker.HTTP_STATUS_CODE` header.
----
[source, java]
@@ -150,7 +150,7 @@ public Function<String, Message<String>> function() {
String payload = "hello";
Message<String> message = MessageBuilder.withPayload(payload).setHeader("statusCode", 404).build();
Message<String> message = MessageBuilder.withPayload(payload).setHeader(FunctionInvoker.HTTP_STATUS_CODE, 404).build();
return input -> message;
};