Semantic Kernel

FREEMIUM
By StudioOusia | Updated 16일 전 | Data
Popularity

0 / 10

Latency

14ms

Service Level

0%

Health Check

N/A

Back to All Discussions

Missing Parameters TEXT

Rapid account: BITEX
BITEX
7년 전

I’m trying to use POST request on php, but I got unexpected result. On the site itself (Test Endpoint), work just fine, but on my development site it said.
Unirest\Response Object
(
[code] => 400
[raw_body] => {“status”: “error”, “message”: “missing parameter: text”}
[body] => stdClass Object
(
[status] => error
[message] => missing parameter: text
)

[headers] => Array
    (
        [0] => HTTP/1.1 400 Bad Request
        [Cache-Control] => no-cache
        [Content-Type] => application/json
        [Date] => Wed, 11 Jan 2017 03:17:05 GMT
        [Pragma] => no-cache
        [Server] => Mashape/5.0.6
        [X-RateLimit-requests-Limit] => 200
        [X-RateLimit-requests-Remaining] => 186
        [Content-Length] => 57
        [Connection] => keep-alive
    )

)

although I copied the source code from the testing point.
response=Unirest\Request::post("https://studioousiasemantickernelv1.p.mashape.com/v1/entitylinking",array("XMashapeKey"=>"<key>","ContentType"=>"application/xwwwformurlencoded","Accept"=>"application/json"),array("lang"=>"ja","text"=>"<somejapanesetext>"));WhenIchangefromPOSTtoGETresponse = Unirest\Request::post("https://studioousia-semantic-kernel-v1.p.mashape.com/v1/entity-linking", array( "X-Mashape-Key" => "<key>", "Content-Type" => "application/x-www-form-urlencoded", "Accept" => "application/json" ), array( "lang" => "ja", "text" => "<some japanese text>" ) ); When I change from POST to GET response = Unirest\Request::get()
it works, but it limit to just 1,000 characters. This sound like an opposite from the documentation said 10,000 characters.
any help please appreciate.

Join in the discussion - add comment below:

Login / Signup to post new comments