Question: i tried this way but geting a bad request 

```
  var id = localStorage.getItem('sessionId');
     $.ajax({
        method:'POST',
        url:'video/ratings?sessionId='+id+'',
        data:{"videoId":"5757e6e41b0a244b256ac1d7","rating":"5"},
        success:function(data){
        console.log(data); 
        } 
     }

 );

```

> 
> these are inputs i have given with
> 
> 
> 
> ```
> (required)queryurl:/video/ratings?sessionId=CqqAfowuZLzXHyViPaYzzyOU3dGPCFaG
> input:{"videoId":"5757e6e41b0a244b256ac1d7","rating":"5"}
> 
> ```
> 
>

Answer: 
The answer was contained in the code from the link posted by Haukinger:

```
object actual = 
    container.Resolve<IDatarecordSerializer>(
        new ParameterOverride(
            "type", 
             new InjectionParameter(typeof(string))
        )
    );

```
The simpler way out is to register a factory :

given:

```
internal interface ITyped
{
    Type Type { get; }
}

internal class Typed : ITyped
{
    public Typed(Type type)
    {
        Type = type;
    }

    public Type Type { get; }
}

```

Fty:

```
internal class TypedFactory : ITypedFactory
{
    public ITyped Create(Type type)
    {
        return new Typed(type);
    }
}

internal interface ITypedFactory
{
    ITyped Create(Type type);
}

container.RegisterType<ITypedFactory, TypedFactory>();

Assert.AreEqual(
    container.Resolve<ITypedFactory>().Create(typeof(string)).Type,
     typeof(string));

```

is not rocket science but is simple, obvious and easier to debug