我想將Boxes物件串列作為查詢引數傳遞到 URL。例如:
[
{
"text": "One does not simply",
"x": 10,
"y": 10,
"width": 548,
"height": 100,
"color": "#ffffff",
"outline_color": "#000000"
},
{
"text": "Make custom memes on the web via imgflip API",
"x": 10,
"y": 225,
"width": 548,
"height": 100,
"color": "#ffffff",
"outline_color": "#000000"
}
]
我不知道該怎么做,所以我嘗試了類似的方法,但沒有奏效。
https://api.imgflip.com/caption_image?template_id=615795&username=dssfdfd&password=sdssfs&text0=hjfdksl&max_font_size=30&boxes=[
{
"text": "One does not simply",
"x": 10,
"y": 10,
"width": 548,
"height": 100,
"color": "#ffffff",
"outline_color": "#000000"
},
{
"text": "Make custom memes on the web via imgflip API",
"x": 10,
"y": 225,
"width": 548,
"height": 100,
"color": "#ffffff",
"outline_color": "#000000"
}
]
知道怎么做嗎?謝謝你的幫助。
uj5u.com熱心網友回復:
您對盒子陣列的查詢字串應該是這樣的,請注意“#”已從顏色屬性中洗掉,因為它們通常會干擾結果。您可以將它們添加回 API 端。
boxes[0].text=One does not simply&boxes[0].x=10&boxes[0].y=10&boxes[0].width=548&boxes[0].height=100&boxes[0].color=ffffff&boxes[0].outline_color=000000&boxes[1].text=Make custom memes on the web via imgflip API&boxes[1].x=10&boxes[1].y=225&boxes[1].width=548&boxes[1].height=100&boxes[1].color=ffffff&boxes[1].outline_color=000000
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/448247.html
