简体   繁体   中英

What is the solution to the “406 Not Acceptable” problem?

i have error #406 Not Acceptable

just when i add "url" http:// on end api url like this:

http://sl.abudayah.com/api.php?create=http://

how can me fix it ?

What is the solution to the "406 Not Acceptable" problem ?

It's probably best to encode the parameter being passed. If you're using PHP to generate your URLs, go with rawurlencode :

$url .= 'create=' . rawurlencode('http://'); // or however you get the appropriate string

If your link is being generated in another language or by hand, you'll need to look up the appropriate means of encoding it. It all depends on what you want, really...

一种解决方案是查阅api的文档,并找出可以接受的内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM