Questions tagged [bad-request]

HTTP status code 400, implying the request was not understood by the server and should not be redone without modifications.

641 questions
3
votes
1 answer

400 bad request,Azure service management api config change

my problem is that i am getting a 400 bad request when i try to get a responce to my HTTP request. Can anyone tell me why this is happening and possibly how i can fix it? The exact error is : BadRequestNo change in settings specified I…
StevenR
  • 435
  • 1
  • 6
  • 16
3
votes
1 answer

Issue with bad request syntax with flask

I am testing/attempting to learn flask, and flast_restful. This issue I get is: code 400, message Bad request syntax ('name=testitem') main.py: from flask import Flask,request from flask_restful import Api, Resource, reqparse app =…
ishy147
  • 33
  • 1
  • 6
3
votes
0 answers

How to test a BadRequest exception on a POST request

I made a test that checked whether a post method from my controller does what it's supposed to. It worked great! Now I'm supposed to make a test to see whether the right message pops up when I get an 400 error for that post method. Here's what I've…
3
votes
2 answers

Add a message to your HTTP 400 Bad Request in ASP.NET Core 3.1

Is there a way I can add a message to a BadRequest action result, and for that message to be visible to external clients, such as Postman? I am using ASP.NET Core 3.1. Part of my code is included below. I want to say what the problem is—e.g., that…
3
votes
2 answers

How to set breakpoint on [Authorize] Attribute

Is it possible to set a breakpoint on the [Authorize] Atrribute in my class? It has been causing Bad Request errors and I was wondering what inside the [Authorize] Attribute is causing it to do that. Alternatively, is it possible to overwrite the…
JianYA
  • 2,750
  • 8
  • 60
  • 136
3
votes
1 answer

Slash(/) in URI gives HTTP 400 Bad request error from Tomcat

I am using Tomcat 7.0.54.0. There is one REST API in my application using the GET method. In the URI for this API, there is one slash character (/) which I am encoding before calling the API. That example:…
Navnath
  • 1,064
  • 4
  • 18
  • 34
3
votes
2 answers

Google Dataflow Pipeline creation fails with 400: Bad Request / invalid grant

I have been building and creating templates for google dataflow for over a year now. I never had a problem creating templates and uploading them to gcs with the options.setTemplateLocation(templatePath); call. Since today, when creating the Pipeline…
3
votes
1 answer

Response code: 400 Bad Request Error in Jmeter 4.0. Need assistance in fixing this error

I am using JMeter 4.0 for recording & running performance tests. I am also fairly new to this tool and for the 1st time, I'm getting Error 400 Bad request for which all the tests are failing. I am recording a website through VPN & trying it to run…
Souvik
  • 41
  • 1
  • 1
  • 5
3
votes
1 answer

Getting Bad Request on seemily valid Django Rest Framework Post request asking for FK in Serializer data

I am creating a new SearchNeighborhood object and connecting it to a already create SearchCity object in a POST request. I have the following models class SearchCity(models.Model): city = models.CharField(max_length=200) class…
3
votes
2 answers

Spring-Boot : 400 Bad request error even when parameter is present

In the following method there are two parameters childFile and file, I run this call through postman but it gives me 400 Bad Request error when I check the logs it says that parameter childFile is not present, I attach code, error and postman…
SFAH
  • 534
  • 1
  • 8
  • 24
3
votes
3 answers

Retrofit POST Method with Json data got error code 400 : Bad Request

I would like to call a POST Method(Magento REST API) in Retrofit with a JSON data(provide JSON as JsonObject). For that, I call as follow from the postman and work fine for me. I have done the android parts as follow, API INTERFACE public interface…
Subin Babu
  • 1,515
  • 2
  • 24
  • 50
3
votes
0 answers

invalid_argument when calling FireBase notification send API with Google Playground

When trying to use the FireBase notification API from Google Playground, "invalid_argument" is returned with a bad request (400) response. Has anyone already faced this issue ? POST /v1/projects/project-XXXXX/messages:send HTTP/1.1 Host:…
3
votes
1 answer

Setting up SP Initiated Sign on using OKTA

I am trying to setup SAML using SP initiated sign on in OKTA (IdP) using my Windows Application (SP) however i get a 400 bad SAML request after IDP authentication of my credentials. Instead of redirecting back to the application URL (SP) i get a 400…
3
votes
2 answers

Tomcat server is responding with 400 bad request for this URL

I've deployed a static web application using Apache Tomcat 8.5.8 When I call the normal URL, it works fine. http://localhost/example/index.html But when I call the following URL, it gives me 400 bad request…
Batu Zaya
  • 33
  • 1
  • 4
3
votes
3 answers

Handling special characters in REST API

I am having following URL http://context_path/info/abc/def which gets converted like http://context_path/info/abc%2Fdef Where as my controller mapping is: @RequestMapping(value = "/info/{id}", method = RequestMethod.GET) here 'id' contains…
SuhasD
  • 728
  • 2
  • 7
  • 20