Ask a Question

DELETE Method Without Content-Type Header?

SOLVED
smartbearuser43
Frequent Visitor

DELETE Method Without Content-Type Header?

Is it possible to create a DELETE request (either HTTP or REST) without having to supply a Media Type from the dropdown? I need to omit the Content-Type header in my request.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
richie
Community Hero

Re: DELETE Method Without Content-Type Header?

Hey @smartbearuser43,

Do you have a payload associated to your DELETE request?

If you havent got a payload, then if you remove the value 'application/json' from the MediaType combo box (editable dropdown) so there is no value in the field and then resubmit your request, the Content-Type header is not dynamically generated....i.e. your request wont have the Content-Type header anymore.

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

1 REPLY 1
richie
Community Hero

Re: DELETE Method Without Content-Type Header?

Hey @smartbearuser43,

Do you have a payload associated to your DELETE request?

If you havent got a payload, then if you remove the value 'application/json' from the MediaType combo box (editable dropdown) so there is no value in the field and then resubmit your request, the Content-Type header is not dynamically generated....i.e. your request wont have the Content-Type header anymore.

Cheers

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: