http-status-codes Questions

1

I have API Gateway as a trigger to my lambda function. Whenever my lambda raises an exception, it gets matched with the pattern configured in Integration Response. The problem is if the exception c...

3

Solved

Hopefully this is a simple one, but I have some custom middleware which I want to return a 404 or 401 etc to the user and stop the propagation of other handlers etc. I was expecting I could do som...
Peltry asked 2/8, 2013 at 12:55

13

Solved

I am working on an iOS project. In this application, I am downloading images from the server. Problem: While downloading images I am getting Request Timeout. According to documentation HTTP sta...
Quotha asked 8/11, 2013 at 11:40

4

Solved

I am trying to capture http status code 3XX/302 for a redirection url. But I cannot get it because it gives 200 status code. Here is the code: import requests r = requests.get('http://goo.gl/NZek...
Joaquinajoash asked 3/3, 2014 at 14:59

4

Solved

My question is simple, how do I display a custom error page for HTTP status 405 (method not allowed) in Django when using the @require_POST decorator? I'm using the django.views.decorators.http.r...
Photolysis asked 6/1, 2011 at 11:14

3

I have some code (see below) written in Go which is supposed to "fan-out" HTTP requests, and collate/aggregate the details back. I'm new to golang and so expect me to be a nOOb and my knowledge ...
Incognizant asked 16/8, 2015 at 18:22

2

Solved

I have a rest that receives among other things, a date and with it, makes a reservation. The problem occurs when 2 people "at the same time" try to book on the same day, at the same time. Obvious...
Dempstor asked 8/1, 2019 at 12:43

5

Solved

What is the best way to see a URL exists and the response is not a 404 ?
Cosmos asked 14/12, 2010 at 8:30

9

Solved

I'm currently returning 401 Unauthorized whenever I encounter a validation failure in my Django/Piston based REST API application. Having had a look at the HTTP Status Code Registry I'm not convinc...
Batty asked 24/12, 2009 at 22:34

10

Solved

What status code should I set for UPDATE (PUT) and DELETE (e.g. product successfully updated)?
Evasion asked 26/2, 2010 at 15:16

9

Solved

I am using RestTemplate to make an HTTP call to our service which returns a simple JSON response. I don't need to parse that JSON at all. I just need to return whatever I am getting back from that ...
Lucarne asked 21/4, 2014 at 20:14

2

Solved

To learn new things about software design, I often analyze .NET framework source codes. During my study today the Microsoft.AspNetCore.Http.StatusCodes class drew my attention when I saw it is not...
Whomever asked 28/4, 2019 at 18:46

9

Solved

I have a list of URLS that I need to check, to see if they still work or not. I would like to write a bash script that does that for me. I only need the returned HTTP status code, i.e. 200, 404, 5...
Dimeter asked 26/5, 2011 at 8:58

1

Solved

How do I check whether a file is present at a URL using the JS fetch API, without downloading the file if it is present? Essentially, I just want to retrieve the status code but not the content. I ...
Blanche asked 30/7, 2021 at 17:50

0

HTTP status code 500 is used for "Internal Server Error"s, but it's very generic. What status code is used by applications/proxies when they detect that a configuration problem prevents t...
Chevalier asked 28/7, 2021 at 11:27

1

Solved

So I am learning FastAPI and I am trying to figure out how to return the status code correctly. I made an endpoint for uploading a file and I want to make a special response in case the file format...
Hearty asked 6/7, 2021 at 12:12

2

Solved

I'm working on a Web API in ASP.NET Core 5. I want to handle errors within my Web API. My service has this code. HttpException is a custom Exception I made so I can have control over the Status Cod...

3

I want to return HTTPStatus code dynamically like 400, 400, 404 etc as per the response object error. I was referred to this question - Programmatically change http response status using spring 3 ...
Urease asked 20/9, 2016 at 8:25

2

Solved

I donwnload a stream with RestSharp by using the ResponseWriter. var client = new RestClient var request = new RestRequest(); // ... request.ResponseWriter = (ms) => { // how to detect the sta...
Manofwar asked 9/10, 2014 at 7:55

3

Solved

I want to download a file and need to check the response status code (ie HTTP /1.1 200 OK). This is a snipped of my code: HttpGet httpRequest = new HttpGet(myUri); HttpEntity httpEntity = null; Ht...
Calorific asked 7/4, 2010 at 13:37

3

Solved

I use custom action filter in asp.net mvc app to return http status code 422 and json list of validation errors (basically serialized model state dictionary) to client, where I handle that with glo...
Vallievalliere asked 16/10, 2012 at 6:31

4

I have a RESTful login web service. However, there's been debate internally as to what status code is best to return in the case that a set of credentials passed to it aren't valid. I've been retur...
Patch asked 28/5, 2014 at 16:59

4

I know this is a fairly common question, but I haven't found an answer that satisfies me. I've been using django rest framework for a while now, but this is mostly irrelevant other than the exampl...
Unconcern asked 13/5, 2015 at 14:25

14

Solved

I'm trying to return a status code of 304 not modified for a GET method in a web api controller. The only way I succeeded was something like this: public class TryController : ApiController { pu...
Allayne asked 18/5, 2012 at 15:20

4

Solved

I am designing a REST like API for paginated data retrieval of a YUI-based client. The REST URL looks like this for a GET request: /app/catalog/data?startIndex=<int>&results=<int>&...
Libertarian asked 9/7, 2012 at 19:55

© 2022 - 2024 — McMap. All rights reserved.