-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error bad request #24
Comments
Looks like you get the error "bad request" which here seems to mean the content type of the post request is not "application/json". |
Thank for your answer. You are right, I've just corrected my code and now I've another question, I need to execute all possible commands available on I'm looking forward to hearing from you! On Tue, Aug 12, 2014 at 1:15 PM, Jonas Ådahl notifications@github.com
Emiliano Bonassi VAT/P.I.: IT06275970967NOTICE TO RECIPIENTS: The information contained in and accompanying this "INFORMAZIONE PER IL RICEVENTE: Le informazioni che sono contenute o che |
Either you list all possible commands in the configuration, or you need to add a separate option like "allow_all" and modify mod_restful_admin.erl to deal with that option. |
Thank you for the suggestion. If you want then I can send you my patch, are you interested in? Best regards, On Thu, Aug 14, 2014 at 1:18 PM, Jonas Ådahl notifications@github.com
Emiliano Bonassi VAT/P.I.: IT06275970967NOTICE TO RECIPIENTS: The information contained in and accompanying this "INFORMAZIONE PER IL RICEVENTE: Le informazioni che sono contenute o che |
Feel free to send any patch you write. |
Great! On Thu, Aug 14, 2014 at 1:31 PM, Jonas Ådahl notifications@github.com
Emiliano Bonassi VAT/P.I.: IT06275970967NOTICE TO RECIPIENTS: The information contained in and accompanying this "INFORMAZIONE PER IL RICEVENTE: Le informazioni che sono contenute o che |
Hi, i need your help to understand why i get this error:
"<0.575.0> Processing throwed error {badmatch,{error,bad_request}}
trace: [{mod_restful,handle_rest_request,5,[{file,"src/mod_restful.erl"},{line,187}]},{mod_restful,process,2,[{file,"src/mod_restful.erl"},{line,161}]},{ejabberd_http,process,2,[{file,"src/ejabberd_http.erl"},{line,355}]},{ejabberd_http,process_request,1,[{file,"src/ejabberd_http.erl"},{line,461}]},{ejabberd_http,process_header,2,[{file,"src/ejabberd_http.erl"},{line,287}]},{ejabberd_http,receive_headers,1,[{file,"src/ejabberd_http.erl"},{line,181}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]
"
The configuration is:
mod_restful:
api:
- path: ["admin"]
module: mod_restful_admin
params:
allowed_commands: [status]
and i send a post request with command argument and none args.
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: