REST get no parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

REST get no parameters

Hans Bakker
Sorry Girish me again,

if i create a simple method service with action GET and no parameters ,
i get a 500 http error,

like:

curl -X  GET https://localhost:8443/rest/services/findProductById -H
"Accept: application/json" -H "Authorization: Bearer $token" --insecure
{
   "statusCode" : 500,
   "statusDescription" : "Internal Server Error"
}

regards,

Hans


grv
Reply | Threaded
Open this post in threaded view
|

Re: REST get no parameters

grv
Hi Hans

I had earlier made a commit 72458a1ef2fd1e5b7c1694e76fece049aecfb0a4 that
should have resulted in 400. If not done already, could you please update
your local repository?

You should get following in response -

{
  "statusCode": 400,
  "statusDescription": "Bad Request",
  "errorMessage": "Missing Parameter: 'inParams'"
}

Best Regards,
Girish Vasmatkar
HotWax Systems

On Thu, Sep 10, 2020 at 6:54 AM Hans Bakker <[hidden email]>
wrote:

> Sorry Girish me again,
>
> if i create a simple method service with action GET and no parameters ,
> i get a 500 http error,
>
> like:
>
> curl -X  GET https://localhost:8443/rest/services/findProductById -H
> "Accept: application/json" -H "Authorization: Bearer $token" --insecure
> {
>    "statusCode" : 500,
>    "statusDescription" : "Internal Server Error"
> }
>
> regards,
>
> Hans
>
>
>