Questions tagged [http-status-code-200]
200 OK The request has succeeded.
61
questions
1
vote
0
answers
30
views
Check IMG URL status (PHP get_headers)
In a nut-shell, I am trying to display feeds from other sites, that sometimes have IMG elements. Ideally, these IMG should be loaded by an external proxy, such as Aratech or Weserv. In my code below, ...
-1
votes
2
answers
58
views
how to redirect to another component in vue 3 using AXIOS after getting API response inside ( then block ) [duplicate]
I am trying to implement some code based on HTTP status code in success response using AXIOS call , How can i access the status code of HTTP response header , and redirect to another component in vu3
0
votes
1
answer
53
views
Python: Return 200 status code even for invalid urls
So what I mean to say is that I want to send get/post requests to invalid url (e.g. https://this-is-a-fake-url.com) I know it will give error because url does not exist but I want to know a way so ...
0
votes
0
answers
488
views
Cypress reutrns 302 instead of 200
I was trying to test sign-in page of our app. I am using cypress to test Vuejs frontend works with AspNet Api. When I click on the signin button on chrome it makes following requests and visits the ...
0
votes
1
answer
877
views
HTTP Status code 202 vs 200 for a POST request
I have confusion that, Im using 202 status code, when I receive a POST request from a client (A) and B is processing it , passing the output to another endpoint(C).
In this case I use 202 status code ...
0
votes
0
answers
208
views
axios.get returns error code 400, but then resolves correctly with code 200
I am trying to make an axios call in my code to get a csv file and convert it to JSON.
I am able to make the call and conversion correctly when the code stands on its own, but when I change it to be ...
0
votes
1
answer
37
views
Should I return a 404 error on a resource resulting in empty set?
If I have a resource with the following endpoint that lists all items within that resource:
/api/v1/resources
This results in:
[
{
"id": 1,
"value": -100
},
{
&...
0
votes
1
answer
188
views
ActionResult<object> Returns Status code 200, ActionResult.Result.Value does contain correct object, but ActionResult.Value is Null
I have a web api method that takes a object, saves the object to the db and then returns the updated db object using return new OkObjectResult(MyObject)... this works perfectly (Object appears in db, ...
1
vote
0
answers
1k
views
Status 200 (from disk cache) and 304 Not Modified issue
I'm using Next.js custom server, which by default sends strong ETag header on each page GET request. For each request I also manually add Cache-Control header res.setHeader('Cache-Control', 'public, ...
5
votes
5
answers
1k
views
Cache-Control not returning 304
I have a website with static assets that don't change (js, images, etc). Each of these assets has the cache-control header set with the following property:
cache-control: public, max-age=31536000, ...
0
votes
1
answer
111
views
Why does valid PDF link returns status code 404?
I am trying to access the status_code of a valid url, however a 404 is returned although the link exists. Here is the line of code that returns me a 404:
print(requests.get("https://www.moh.gov....
0
votes
1
answer
146
views
How to get a description of the httpStatusCode 200?
I have the following Code in Visual Studio
using System;
using System.Windows.Forms;
using System.Net.Http;
using System.Web;
using System.Net;
using System.IO;
namespace Xml_Trial
{
public ...
1
vote
1
answer
928
views
Check Instagram Username for existence
I am trying to validate an Instagram username, that the user should enter. I want to find out whether an account with the username exists or if not. I have tried it this way:
final request = await ...
0
votes
0
answers
652
views
How to change status code of a response in NodeJS?
I'm developing an API in NodeJS that takes the request body of my client to make another request to Brazilian mailing service's API, and then, I give the response to my client in a specific format. ...
2
votes
0
answers
175
views
Rails default behavior: Why is Rails not generating different Etags by default or returning 304 Not Modified?
I am inspecting a Rails response. No http headers have been purposefully set to be returned from the server.
The response includes Cache-Control: max-age=0, private, must-revalidate and Etag. The ...
2
votes
1
answer
5k
views
Return http-status-code 200 or 204 if no content found to process
In web-API client made a get request with a parameter, to process something and get data from the file system.
The parameter requested through the API a folder path.
If API found that path, it is ...
6
votes
2
answers
4k
views
Normal to see Status 204 then Status 200?
I am looking at my ajax request in network tab in chrome and I noticed every ajax request I do happens twice.
First one is a 204 and then followed up with 200. My ajax call is only being hit once so ...
0
votes
0
answers
493
views
Laravel redirect to a named route with param returns status 200
I have the following named route with params, to which I want to redirect from a post request:
Route::get('/view-project-team/{project_request_id}', 'SinglePageController@viewProjectTeam')->name('...
3
votes
4
answers
815
views
HTTP 200 (not 404) status for an empty list result returned from a REST endpoint
Please give me examples of official specification, or trusted recommendations that can prove my business partner that when they return an empty list from a REST endpoint, the HTTP status should be 200,...
0
votes
1
answer
275
views
Vue router history mode in combination with laravel catch all to redirect 404 header gives 200 header status code
I have a Vue project on a Laravel backend for which SEO is important. With my current setup I redirect all incoming requests to my Vue app. Within my Vue app I handle the routing with Vue Router.
...
0
votes
1
answer
302
views
Dilemma between 2xx and 4xx status codes in api rest
I think this problem is not trivial, so I would like to express it in detail
Domain:
I have an endpoint (api rest) that receives a date and time of an appointment that I want to block (which will ...
3
votes
2
answers
4k
views
Executing invoke-webrequest to get status of multple websites in Powershell
We have several websites and I don't want to check the status in powershell using invoke-webrequest -URI google.com every time.
I drafted something like this, which isn't working and I'd like help ...
1
vote
1
answer
349
views
When performing a POST HTTP method the "Response.status(Status.CREATED)" is recognised as undefined for the type "Response" by eclipse
I'm following this tutorial in order to learn how to code RESTful web services - tutorial. Here we are trying to send the status code 201 Created along with the posting of a new message through ...
0
votes
0
answers
179
views
How to handle Response body is (No content )
I am using Ajax Post method , my url doesn't have response body and response status is 200 still generate a error, How to handle it ?
0
votes
1
answer
119
views
Python request behaviour
I want to check if a website exists. I use the request module to make a get request and check the status code after the request was made.
def check_website_exist(self, url):
result = True
...
1
vote
1
answer
260
views
What is a correct RESTful service response to a PUT request on successful update?
What is a correct RESTful service response to a PUT request on successful update?
There are two possible responses that seem to comply with REST architectural style:
Return only a header without ...
0
votes
1
answer
115
views
Where can I find explicit documentation on what's NOT covered by Status Code 200?
We had a discussion today about an transfer operation resulting in status code 200, OK. There were two objects returned looking like this.
First one being fairly graspable (and following the expected ...
1
vote
1
answer
10k
views
How to send a status 200 answering to a HTTPS POST in python
I am using Flask to create an application that receives some data from a server with an HTTPS POST and process its data. Once i receive the message from the server I need to send a "status = 200" so ...
1
vote
1
answer
2k
views
Angular 2 always returns http status code 200 on this.http.get() even if the file doesn't exist
i'm trying to check if a pdf file exists on the server with an HTTP get request,for that i am testing if the status code returned by the server's response is different then 200, the problem is that i ...
0
votes
1
answer
305
views
JBoss 6 EAP - override HTTP response status code in a SOAP service that sends empty response back from 202 to 200
We have a SOAP web service that we are migrating from JBoss EAP 5.1 to 6.4.7 and one of the webservices returns absolutely nothing but 200 (in JBoss 5). When we migrated to 6 it still works and ...
0
votes
1
answer
1k
views
Angular jsonp.get: rejected although status code 200 Ok
I'm trying to call my simple web api developed in Jersey, which results in:
[
{
"id": 1,
"name": "Facebook",
"userName": "abc@gmail.com",
"password": "Qwerty@123"
...
4
votes
0
answers
333
views
.net core rc2 IIS7.5 returns blank page with Code 200
We have created a WepAPI with .NetCore RC2 including EntityFrameworkCore for access to our MSSQL Database.
When publishing this WebAPI on the IIS on my localhost, it is working as expected.
Now I ...
5
votes
1
answer
10k
views
HTTP GET 200 vs 204
We are designing a public API, and trying to figure out what is the best practice for GET with following cases:
Path param:
/orders/{orderId}
Found: 200 with a response body.
Not Found: 404.
Query ...
0
votes
0
answers
496
views
Can HTTP 200 response have incomplete data?
I am requesting pdf binary content from a Tomcat Webserice from a Python Web Application Server.
We have implemented a 2 times retry like this in Python. Once in a while we get an HTTP 500 Response. ...
0
votes
1
answer
73
views
different HTTP response types in node.js reflect same result
I have written the following create server code in node.js:
var http = require("http");
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
...
-1
votes
2
answers
1k
views
Httpcomponents httpcore and httpclient HTTP_status 400
I am trying to do:
Send request from HttpClient (based on HttpComponents HttpClient 4.5).
Receive that request in HttpServer (based on HttpComponents HttpCore 4.4.1).
HttpServer must answer to ...
5
votes
2
answers
1k
views
What HTTP status to use for good request with "bad" input?
I'm writing a microservice for validating promo codes. The client sends me a promo code and a product ID (json). There is the 200 OK case where the code is good, I apply a discount for their order. ...
0
votes
0
answers
841
views
Http Status 200 to response back to third party
I am currently working on the payment gate way which connects to Third Party Payment API by giving some information including return_url (that they will send the payment result back) and notify_url (...
0
votes
0
answers
112
views
How detect 404 page without loading content if server return code 200?
How may I detect that was returned 404 page if server answer code 200? Now I checking content length, but it takes too long. Is there any other ways?
Current code:
HttpWebRequest req = (...
103
votes
7
answers
217k
views
Returning http 200 OK with error within response body
I'm wondering if it is correct to return HTTP 200 OK when an error occurred on the server side (the error details would be contained inside the response body).
Example:
We're sending HTTP GET
...
0
votes
1
answer
464
views
Is there a way to force Apache to replace status 200 with 403?
I am trying to setup a maintenance page for our website. For this when Apache returns the maintenance page I want it to return status 403 instead of 200. This is a requirement from the UI perspective ...
1
vote
2
answers
728
views
HTTPURLConnection Status 200 but inputstream is null
I have the following configuration: a Glassfish server in witch I am running a Java web services. During a process task it is necessary to connect ,with HTTP GET, to an other web services with a ...
0
votes
1
answer
395
views
Avoiding conditional request to the server
I have a js file loaded in cache.
When a html file is loaded in browser it sends a Conditional Requests (found from here) to the server to check if that resource is changed or not.
What I want to do ...
0
votes
2
answers
258
views
HTTP 200 occurs 2 times around HTTP 304
Hi I am using Django and jQuery Mobile and I get 2 HTTP 200's surrounding a bunch of HTTP 304's per page refresh. I commented out all my javascript includes, but I still get this, so I don't think it'...
4
votes
1
answer
20k
views
Why XmlHttpRequest readyState = 2 on 200 HTTP response code
So I'm using plain javascript (no jquery), to send a file to the server. Server script PHP returns status code 200 at the end, but instead javascript is getting readyState == 2.
The PHP code sends ...
0
votes
0
answers
112
views
http status code is displayed as 200 even if my webserver is not running
Even if my webserver is not running, I get the status code 200. Not sure what am i missing?
# Check URL
status_line=`curl -sL -w "%{http_code}\\n" "http://ipaddress:80" -o /dev/null`
status_code=`...
0
votes
1
answer
1k
views
Using java to connect to a site and POST, HTTP Status Code 200
I am using java to connect to a website which has a form of type "multipart/form-data". It asks a user, pass, and file to upload.
When i run my java project, the response i get is "200". According to ...
0
votes
1
answer
363
views
always returns status code 200
I am returning response from onBootStrap() this way..
$app = $e->getApplication();
$em->attach(MvcEvent::EVENT_ROUTE, function($e) use ($app) {
$response = $e->...
0
votes
1
answer
115
views
How do I rewrite this function to be asynchronous? [duplicate]
I have a function that pulls images from an API to insert them in an animated scroller. It looks like this (simplified for clarity):
function getPhotos(id) {
$.when(Service.getPhotos(id))
...
0
votes
1
answer
164
views
Rendering HTML in HTTP 200 instead of 404 - accent in URLs
I have a problem regarding social buttons: facebook like and google plus that don't work. It's a special case because the URL contains accents and it conflicts with the encoded form. Anyways, now I ...