You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2023/01/06 06:31:29 UTC

[GitHub] [apisix] ronething commented on issue #8626: help request: how to use fixed values as response content

ronething commented on issue #8626:
URL: https://github.com/apache/apisix/issues/8626#issuecomment-1373198081

   @chenyyyang Hi, where is your pic come from? And if you want to return fixed_value, you can use `response-write` plugin. 
   
   refer: https://apisix.apache.org/docs/apisix/plugins/response-rewrite/
   
   ```
   curl http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/hello",
       "plugins": {
           "response-rewrite": {
               "body": "Hello, World!"
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:80": 1
           }
       }
   }'
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org