Questions tagged [http-status-code-400]

400 Bad Request. Add this tag to a question if your requests receive this answer.

The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications.

See also RFC2616.

806 questions
2
votes
3 answers

Jquery POST 400 Bad request

Can someone help me with this 400 bad request I'm getting? Here is my code: saveBttn.click(function() { var expireDate = $('#expire_date_picker').val(); var newStatus = $('#User_email').val(); if (expireDate.length >…
lrente
  • 1,070
  • 1
  • 9
  • 27
2
votes
1 answer

Bad Request - Invalid Hostname

I am trying to get result from my WebService with name Service1.svc I get success result by address http://localhost:49534/Service1.svc IP address of my computer is 192.168.1.134 Why do I get Bad Request - Invalid Hostname by address HTTP Error…
Bob
  • 773
  • 1
  • 10
  • 20
2
votes
1 answer

Rails how to fix malformed request (error code 400)?

I am running RSpec for api, specifically to create posts (I am also working on :update and :destroy, but those two are running fine. I am having trouble with :create) Here are my RSpec: describe "POST create" do before { post :create, topic_id:…
Iggy
  • 5,129
  • 12
  • 53
  • 87
2
votes
1 answer

JAVA HttpsConnection POST send image and text

I am trying to send a text and a image via HTTP POST and I always get a 400 error. I would like to use it to send a image via Telegram bot and I am using the code provided in this answer with a text and bite parameters…
2
votes
1 answer

Android Volley not passing post parameters using custom request

I am using volley for simple REST request and passing some post parameters in it. But It always giving response BasicNetwork.performRequest: Unexpected response code 400. I have tried following custom request. public class GsonRequestRest
2
votes
1 answer

What HTTP Response code to return for urls containing " or %22?

Per https://www.rfc-editor.org/rfc/rfc7230#section-3.1.1 recipients of an invalid request-line SHOULD respond with a 400 - Bad Request. Thus as per the RFC, the request, GET /cat".html HTTP/1.1 should return 400. I've written a server that will…
2
votes
1 answer

Vimeo API - unacceptable content-type: text/plain

I am using Vimeo API in my iOS application. But since few days it has stopped working, It gives me error while I am trying to upload any videos. Following is the way, I am creating the request NSURL *uploadURL = [NSURL URLWithString:endpoint]; …
Nirav Dangi
  • 3,607
  • 4
  • 49
  • 60
2
votes
1 answer

SimpleMappingExceptionResolver only works on some Exceptions

Using Spring 2.5.6, I have SimpleMappingExceptionResolver configured thusly
nflearl
  • 131
  • 7
2
votes
1 answer

Instagram API Locations Endpoint

I'm trying to access the Instagram API location endpoint with the below call, but keep getting the error further…
MattDionis
  • 3,534
  • 10
  • 51
  • 105
2
votes
1 answer

Google Drive API watch 400 error Ruby on Rails

I'm implementing the google drive api using the OAuth2 gem (ruby on rails). I'm not using the client library because I'm also integrating other API's, so I'm trying to make all these calls as modular as possible. I'm having trouble with the this…
2
votes
0 answers

400 bad request only on port forwarded router

Recently I got a small webserver. I port forwarded the webserver's IP4V to a public static IP. When I am connected to the port forwarded router and I go on the public IP on my browser I get the 400 Bad request Error. But when I am connected to a…
2
votes
1 answer

spring 400 bad request. How can I fix it or at least see what is causing it?

I am having a real tough time with this. I have done a ton a research and nothing has worked. Please help. I have a spring REST call and a jquery ajax PUT and POST method that both give a 400 bad request. I have done JSON.stringify, raw object data,…
user3594045
  • 33
  • 1
  • 9
2
votes
1 answer

Can a http service return HTTP 400 (bad request) if a required parameter is missing?

Can a http service return HTTP 400 (bad request) if a required parameter is missing? When I read around it seems that http 400 should only be returned on syntax errors in the request, but can I treat a missing argument like this?
xastor
  • 482
  • 5
  • 17
2
votes
1 answer

Return a custom error message for 400 requests that don't hit the controller

I need to be able to return a custom error message for requests that are Bad Requests, but don't hit a controller (ex. Having bad JSON). Does anyone have any idea how to go about this? I tried the @ExceptionHandler annotation to no avail. Any help…
2
votes
0 answers

angular resource 400 bad request

Hi i have some trouble with angular resources, I tried an url in post method however i get an 400 error bad request. It's maybe my mistake but i tried in CURL curl -d widget_type=creativity -d settings='{"idea":"local:Idea/2"}'…