How to set POST request as default?
See original GitHub issueTrying to set POST as default request type, but getting it wrong. Current container is Autofac.
var builder = new ContainerBuilder();
builder.RegisterType<PostSolrConnection>()
.Named<ISolrConnection>("SolrConnection")
.WithParameter("serverUrl", serverUrl);
builder.RegisterModule(new SolrNetModule(serverUrl));
var container = builder.Build();
var solr = container.Resolve<ISolrOperations<Product>>();
Still getting GET as default request. This/this links won’t help. I’m wondering if PostSolrConnection is included in lib.
How can I set POST request as default?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Set Defaults and Validate POST Request - node.js
In the schema, You can use default(...) which will allow to to specify default values of the fields (in that case when title...
Read more >Ajax request type can be set to GET (POST by default)
If the httpMethod property is not set, it defaults to POST. Views now uses GET requests by default when the "Use AJAX"
Read more >POST - HTTP - MDN Web Docs
The HTTP POST method sends data to the server. ... A simple form using the default application/x-www-form-urlencoded content type: http
Read more >jQuery.post( url [, data ] [, success ] [, dataType ] )Returns
A set of key/value pairs that configure the Ajax request. All properties except for url are optional. A default can be set for...
Read more >GET vs POST - Difference and Comparison
HTTP POST requests supply additional data from the client (browser) to the server ... use either method by specifying method='POST' or method='GET' (default)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mmoldabe that is a different issue, please add an extra param “wt” with value “xml”
options.ExtraParams = new KeyValuePair<string,string>[] { new KeyValuePair<string,string>(“wt”, “xml”) };
@gjunge trying to run your snippet using Ninject Module, but getting same error as for Autofac:
This is for standard q=sample query. This happens for both Autofac and Ninject when trying to do PostSolrConnection. Guess, this happens before SolrNet sends request to Solr server, because Solr and Fiddler logs are empty. I wonder why this happens and how to fix that. Can you help?