OpenEdge 11.7 - REST response with no payload (204)

Posted by pumpkinstealer on 13-May-2019 00:17

Does OpenEdge support REST responses with no payload?  I am trying to do a PATCH request that returns a status code of 204 without a payload.  When I try to execute the request, it waits for a response and eventually times out.  I am able to execute rest requests as long as the response returns a payload.

All Replies

Posted by Peter Judge on 13-May-2019 15:06

Do you mean from the HTTP client? And if so, what version are you using? Also, is there a Content-Length header returned?
 
 

Posted by pumpkinstealer on 13-May-2019 15:56

oRequest = RequestBuilder:PATCH(cFullUrl, oJsonData)

                                           :UsingCredentials(oCredentials)

                                           :REQUEST.  

oResponse = ClientBuilder:Build():UsingLibrary(oLib):Client:EXECUTE(oRequest).

oRequest is an IHttpReequest and oResponse is an IHttpResonse. I am using version 11.7.2.

A Content-Length header is not returned when I do the request in swagger.  

Posted by pumpkinstealer on 13-May-2019 17:52

oRequest = RequestBuilder:PATCH(cFullUrl, oJsonData)
                                           :UsingCredentials(oCredentials)
                                            :REQUEST.

oResponse = ClientBuilder:Build():UsingLibrary(oLib):Client:EXECUTE(oRequest).

oRequest is defined as an IHttpRequest and oResponse is defined as an IHttpResponse.  It just waits until it eventually times out.  Other requests are working fine as long as they are returning a response body.

There is no Content-Length header returned when doing the request with Swagger.

Posted by pumpkinstealer on 14-May-2019 15:29

I am using Openedge version 11.7.2  When doing the request in Swagger there is no Content-Length header returned.  This is what I am using to do the request.

oRequest = RequestBuilder:PATCH(cFullUrl, oJsonData)

                                           :UsingCredentials(oCredentials)

                                           :REQUEST.    

oResponse = ClientBuilder:Build():UsingLibrary(oLib):Client:EXECUTE(oRequest).

Posted by pumpkinstealer on 14-May-2019 16:40

I am using Openedge 11.7.2.  When doing the request in Swagger there is no Content-Length header returned.  This is how I am doing my request.

oRequest = RequestBuilder:PATCH(cFullUrl, oJsonData)

                                           :UsingCredentials(oCredentials)

                                           :REQUEST.      

oResponse = ClientBuilder:Build():UsingLibrary(oLib):Client:EXECUTE(oRequest).

ORequest is an IHttpRequest and oResponse is an IHttpResponse.  This is not returning a response object, and eventually times out when the request is successful.  This request is returning a response code of 204 with no response body.  Is there a way to handle requests without a response body returned?

Posted by pumpkinstealer on 14-May-2019 23:30

Why are my replies not posting?

Posted by Peter Judge on 30-May-2019 14:52

This should be fixed in the next 11.7.x release (as part of the fixes to bug ADAS-12761)

This thread is closed