HTTP status code 400, implying the request was not understood by the server and should not be redone without modifications.
Questions tagged [bad-request]
641 questions
2
votes
2 answers
How to normalize BadRequest(ModelState) casing in ASP.NET Core API Results
I'm returning BadRequest(ModelState) from an ASP.NET controller action, like this:
public class Person{
[MaxLength(40)]
public string Name{get;set;}
public double Height{get;set;}
}
public Put([FromBody]Person item){
…

Daniel
- 3,021
- 5
- 35
- 50
2
votes
4 answers
Parameterization removes escape character from JSON POST request and gives Bad request error 400 in JMeter
JMeter script recording capture JSON post request with three escape character(\) and rerun as it is without parameterization it works fine.
But if we use any Variable "${xyz}" anywhere in the request body and run in JMeter, all the three slashes(\)…

ArupBiswas
- 21
- 2
2
votes
1 answer
TestServer and HttpClient get BadRequest for antiforgery token in .net core web api
I have a problem to call default endpoint '/api/values' from xUnit test project. Web api is default .net core project. I always get bad request - 400 even I add header with value from AF cookie on each request.
First i setup antiforgery in Startup…

plamtod
- 79
- 3
- 9
2
votes
2 answers
Getting 400 Bad Request despite catching the err in angular2+
I have designed a login page where login is successful when i put a correct login and password and Login doesn't happen when I put an incorrect username or password which is correct. However, I get this error:
POST…

Techdive
- 997
- 3
- 24
- 49
2
votes
2 answers
£ sign in url causes bad request in SharePoint
We have a file in sharepoint with a £ sign as part of the url.
When we try to retrieve this file we get a bad request.
Interesting thing is that this is only a problem in production not in test.
Anyone know what setting could be causing this…

Shiraz Bhaiji
- 64,065
- 34
- 143
- 252
2
votes
0 answers
UWP client PUT and POST Requests Fails with PHP API
I have a problem when I´m trying sending post and put requests to my webapi (the server side is coded in php and works with mysql).
If I try to send a get request there is no problem at all, the API responds properly, the problem comes when I try to…

alag
- 21
- 3
2
votes
1 answer
Bad response when writing secret using node-vault
I have started a Hashicorp Vault dev server in my local machine:
$ vault server -dev
It shows an Unseal Key and a Root Key. Then, I have executed:
$ vault auth enable app-id
And I have this code:
const rootKey = //whatever;
const unsealKey =…

Héctor
- 24,444
- 35
- 132
- 243
2
votes
0 answers
Angular 4 - IE, Firefox 400 Bad Request
I have angular 4 app that is working well in Chrome but IE and FF is showing 400 bad request, when I compare the http headers between IE and Chrome, I see IE, FF is adding additional headers. When I removed "If-Modified-Since: 0" header in Firefox…

Code-Strings
- 111
- 2
- 10
2
votes
1 answer
error Bad Request (400), when I go to the site on the domain
I started the django project on digitalocean.com. The problem is that on my ip address my site is loaded and there are no problems, but if I go through the domain, the "Bad Request error (400)". Domain bought at godaddy.com. Domain settings are…

Echo Foe
- 398
- 1
- 2
- 16
2
votes
1 answer
Python '_AppCtxGlobals': Attribute Error in Flask
I have implemented a code to calculate api time.
@api.app.before_request
def before_request():
g.request_start_time = time.time()
@api.app.after_request
def after_request():
elapsed = time.time() - g.request_start_time ------> Error…

Sunny Jain
- 514
- 2
- 15
2
votes
1 answer
Angular 4.3 HttpClient: catch webapi error response body
I'm trying to handle errors returned by my .NET Core WebApi from an Angular 4.3 service using the new HttpClientModule.
I'm making the http request as follows:
postUser(model: IPostUser): Observable {
return…

Androidian
- 1,035
- 1
- 16
- 40
2
votes
1 answer
Sendgrid error 400 Bad Request
I'm getting this error message when trying to send a email through SendGrid:
400 { "errors": [ { "message": "Bad Request", "field": null, "help": null } ] } array(14) { [0]=> string(25) "HTTP/1.1 400 Bad Request " [1]=> string(14) "Server: nginx "…

Gustavo
- 874
- 4
- 13
- 27
2
votes
0 answers
error 400 Bad Request - Retrofit
Everything works fine for some time. After some usage of the app,with every api hit, it starts giving this repsonse, for all apis.
400 Bad Request
…

Bawa
- 876
- 10
- 28
2
votes
1 answer
HTTP 400 Bad request when calling Rest WebService POST method
Please find the relevant classes and JSON request, I fail to understand what is wrong with my request, I get 400 BAD Request. The request perhaps is not even reaching the server. I dont have a clue whats missing. Appreciate your help on this
Json…

Sri Sris
- 2,001
- 2
- 11
- 10
2
votes
1 answer
HTTP/1.1 400 Bad Request. Bad number of command parts
Im trying to execute the following code from Chapter 12 of the book "Python for Informatics".
import socket
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysock.connect(('www.py4inf.com', 80))
mysock.send('GET…

Arjan Groen
- 604
- 8
- 16