curl: redirect 302: Not changing the method from POST to GET
问题 I have a url(/add_item) to which i send data using a POST method. After finishing the task it will redirect to url2 (/show_items) I using the curl command (POST method and also --location is used to auto redirect). The following is the command $ curl --verbose --location --request POST 'http://127.0.0.1:8000/add_item' \ --header 'Content-Type: application/json' \ --data-raw '{ "item" : "new" }' The output Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1..