EasyNetQ.Management.Client icon indicating copy to clipboard operation
EasyNetQ.Management.Client copied to clipboard

Trying to create a shovel results in a HTTP 400 BadRequest

Open bacobart opened this issue 5 years ago • 3 comments

Trying to create a shovel results in a http 400 error. Reverting https://github.com/EasyNetQ/EasyNetQ.Management.Client/commit/12f949fdf1fb94d9088261e0017d47cb3f17c59a solves the issue. This happens with version 1.3.0.

	var client = new ManagementClient(...);
	
	var shovel = new ParameterShovelValue
	{
...
	};
		
	var parameter = new Parameter 
	{
		Component = "shovel",
		Name = "test",
		Value = shovel,
		Vhost = "/"
	};
	
	client.CreateParameter(parameter);

Related: #35

bacobart avatar May 25 '20 14:05 bacobart

I'm having this issue as well, is there any workaround for this?

hank-scorpio avatar Jun 08 '20 19:06 hank-scorpio

One workaround is to wrap the ParameterShovelValue in a dummy object to restore the original behavior until this is fixed:

var parameter = new Parameter 
{
        ...
	Value = new { value = shovel },
        ...
};

hank-scorpio avatar Jun 08 '20 20:06 hank-scorpio

Hi @bacobart @hank-scorpio,

Feel free to create PR to fix this issue. Thanks.

Pliner avatar Jun 09 '20 03:06 Pliner