Questions tagged [http-status-code-204]

The HTTP response status code 204 No Content

The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.

68 questions
0
votes
1 answer

Node HTTP server hangs when sending 204 - NO CONTENT response

I'm having an issue wherein sending a response with a 204 - NO CONTENT status code via my NodeJS HTTP server causes the response to hang indefinitely, timing out the initiating request. response.statusCode =…
Trevor Sears
  • 459
  • 8
  • 24
0
votes
1 answer

Rails 6 - on a POST is it safe to rely on 204 (No Content) to let Jquery update the same page while a record is created in background?

Background: in Rails 5+, a POST route without an associated View now simply returns a 204 status code to the browser (instead of raising a ActionView::MissingTemplate exception as done before Rails 5). Which, as far as I understand it, tells all…
jpw
  • 18,697
  • 25
  • 111
  • 187
0
votes
0 answers

How to handle "204 no content" response with Retrofit after logout?

In my Android app, I have the following logout function: suspend fun logout(token: String): NetworkResult { return try{ val logoutResponse = service.logout("Token $token") NetworkResult.Success(logoutResponse) …
0
votes
1 answer

What's the appropriate Response Code for a Pagination API using a GET Request with page parameters, where the parameters produce no records?

I have developed a Web Interface for a db. The db and Web Interface are for my own use in my hobby running on my private intranet. Currently the db has 1800+ records which is going to increase with usage. Ver 1 of the Web Interface listed all…
0
votes
1 answer

Is that possible to have 204 status code with non-empty response

I'm using http module. The Front-End developers team asking me when there are no results, send a response with an empty list and status code 204. I tried this: AllPosts := logic.MergedSearchSearchPost(params) if len(AllPosts.Posts) == 0 { …
mrasoolmirza
  • 787
  • 1
  • 6
  • 22
0
votes
1 answer

Can a POST request be redirected as another GET request

I am working on a react application, where there is a need to send the object parameters inside a body because of confidentiality. So I am making a POST request from the react app client-side to the backend server like this axios …
Deepika
  • 95
  • 1
  • 5
0
votes
1 answer

.htaccess rewrite condigion for filematch if directory doesn't exist

i'm getting a little bit frustrated, so any help would be appreciated. Is it possible to catch a 404/directory not found, combined with a FilesMatch-block in .htaccess? I created the following .htacces in order to rewrite non existing .json-files to…
Bazardshoxer
  • 545
  • 1
  • 5
  • 22
0
votes
1 answer

sending the same request multiple times in a raw. some return with status code 204 and some are ok

I'm sending a post request to the same url multiple times in a row. Some of the requests return 200 status code and some return 204 saying no content. the request updates some content in a mongo database. I don't know if this is relevant. What could…
0
votes
1 answer

TypeError: Network request failed for 204 (No Content) and 304 (Not Modified) call over HTTP2 (ERR_HTTP2_PROTOCOL_ERROR in Chrome)

We have switched from HTTP1.1 to HTTP2 protocol and have noticed that some requests fail. When a server responds with 204 or 304 we get the following error: TypeError: Network request failed Chrome additionally shows it with the following error on…
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
0
votes
1 answer

How do I check status code 204 (NO CONTENT) in Volley JSONObject request Android

Looked around but couldn't find solution to this. Checking status code via following code: JsonObjectRequest req = new JsonObjectRequest(URL, null, response -> { Log.d("Response", response.toString(4)); …
0
votes
3 answers

Api call gives 204 from application

I have deployed my react app and .net core api on server. .net core api call works fine when I checked from browser. But when I invoke it from react app it gives 204 no-content. Everything works fine in local. I have enabled CORS like…
Tra
  • 43
  • 8
0
votes
1 answer

REST api: best practices in case of no content

I'm pretty familiar with rest apis, but today I was asked this: "what if a resource exists but it's content have been blocked for some reason?" example: try to retrieve users/18 but user with id 18 has been banned/blocked/whatever. I think the best…
jack_the_beast
  • 1,838
  • 4
  • 34
  • 67
0
votes
1 answer

API Request not working in ajax but working in POSTMAN

Im trying to make a post request with one parameter in AJAX to a local server. When I execute the request in postman it seems to work perfectly fine but when I do it with AJAX it sends over two requests one as a 204 and another one as a 404 which…
user10421953
0
votes
1 answer

Http failure during parsing | 204 status with error state

I trying to log my native-angular applications log in influxdb which is installed on my server. whlie posting log to server API is succeeding and return 204 status code along with the error. for this i have refer many answers like this but not…
0
votes
2 answers

Is it possible for a server to return a body with a code of 204?

Quoting https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success : 204 No Content The server successfully processed the request and is not returning any content. Is this part about not returning any content: Enforced by the HTTP…
user4385532