Let's say I have this curl request here.
curl -X GET https://someurlhere.com/getToken
All this does is call a controller method that generates some random token. The response is as follows:
a3f449e7-0a25-7345-4c56-283f258e0098%
Why is there a percentage symbol being appended at the end of the response in the terminal? Also does anyone know if this affects the actual code?
I've tried other curl requests using the cli and all of the responses coming from my API are being displayed with that "%" appended at the end.. It's very strange. Any thoughts?
答案 0 :(得分:0)
这是zsh
主题的行为
这是一个小实验,我得到了一个名为test.py
的小python脚本,其内容是:
#!/usr/bin/env python
import sys
sys.stdout.write('test')
sys.stdout.flush()
我首先在zsh
中运行,然后在bash
中运行,您可以注意到以下差异。
➜ /tmp ./test.py
test%
➜ /tmp exec bash
bash-3.2$ ./test.py
testbash-3.2$