开发者

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

开发者 https://www.devze.com 2023-02-04 15:45 出处:网络
i have error #406 Not Accep开发者_Go百科table just when i add \"url\" http:// on end api url like this:

i have error #406 Not Accep开发者_Go百科table

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...


A solution is to consult the documentation for your api, and find out what is acceptable.

0

精彩评论

暂无评论...
验证码 换一张
取 消