Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to figure out this problem?
Message
 
 
À
11/02/2015 03:34:26
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01615127
Message ID:
01615159
Vues:
24
>>>Use the developer tools in the browser to see what is actually getting sent.
>>>
>>It actually helped to figure out the problem eventually. The http call was wrong from that page
>
>Getting a 400 from the WebAPI controller was a good indication of that :-}
>
> - not sure how it worked before. I made a fix and it's now working.

I agree, the only strange thing was that it used to work that way and all of the sudden stopped. May be something got changed in the routing?

In the API controller we have this method:
[Route("")]
        public IHttpActionResult GetLayouts(
		[FromUri]LayoutSearchViewModel searchViewModel,
		[ModelBinder(typeof(SearchRequestModelBinder))]SearchRequest searchRequest)
        {
            SetUpSearch(searchRequest, searchViewModel);
            return Ok(searchViewModel.Result);
        }
And the http call was using this location:
 var dialogTypes = [{ name: 'layouts', location: '/api/layouts/getlayouts/' },
                              { name: 'forms', location: '/api/forms/getforms' }];
I changed this to
 var dialogTypes = [{ name: 'layouts', location: '/api/layouts' },
                              { name: 'forms', location: '/api/forms/getforms' }];
and it's now working. But how did it work before - that's perplexing and that's why we spent so much time trying to understand how to fix it.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform