Jump to content
WAPT Forum
Sign in to follow this  
avin_mehya

Passing just content-type inside the request header

Recommended Posts

Hi,

We have a situation here where the request headers are identical barring just one difference with respect to content type. In the recorded request this happens to be application/json while during test the charset gets appended to the content-type. 

Response is returning an 500 Internal Server error as the method is throwing Null Pointer exception. This request with charset was posted through browser as well and it failed.

I tried to add a request header with the below values so it would overwrite the automatically generated header. But that returns with content-type. Is there a way where we can send this request by isolating the charset part from the content-type.

Recorded Request

content-type: application/json

Test Request

content-type: application/json; charset=UTF-8

 

 

Share this post


Link to post
Share on other sites

If you manually add the Content-Type header to the end of the headers list with the overwrite option it should overwrite the automatic default header. Could you give me you profile so I could check it?

Share this post


Link to post
Share on other sites

Thanks a lot Sergei. Overwriting option works fine. But there are a lot of requests with similar request headers. So can this be set globally in the Default HTTP Headers at Profile level. Because there i dont see a dropdown of Overwrite. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...