alexandrehtrb / Pororoca

An API testing tool with support for HTTP/2 and HTTP/3. Alternative to Postman.
https://pororoca.io
Other
500 stars 38 forks source link

Content-Types application/dns-json and application/dns-message are missing #19

Closed SamLowryMOI closed 1 year ago

SamLowryMOI commented 1 year ago

I want to test DoH, would you please add Content-Types application/dns-json and application/dns-message? Thank you. Otherwise a very nice program!

-edit- I was wrong. File as body type doesn't work, even with the right Content-Type. I need binary type with possibility to specify a file like in postman. That's probably a bit more complicated I think. What are the chances of something like this happening in the near future?

alexandrehtrb commented 1 year ago

Hello @SamLowryMOI ,

Do you want these Content-Types available as text in responses, or available in requests? (or both?) The MIME type for unspecified binary content is application/octet-stream Is this what you would like?

image

SamLowryMOI commented 1 year ago

Do you want these Content-Types available as text in responses, or available in requests? (or both?)

Neither nor.

I was wrong. File as body type doesn't work, even with the right Content-Type. I need 'binary' as body type with possibility to specify a file like in postman. That's probably a bit more complicated I think. What are the chances of something like this happening in the near future?

alexandrehtrb commented 1 year ago

Is this the error you are receiving?

image

To fix this, I will add application/dns-json and application/dns-message MIME types in the next release.

The "binary" body type in Postman is actually Content-Type: application/octet-stream, which is available in Pororoca.

SamLowryMOI commented 1 year ago

Is this the error you are receiving?

Yes.

I didn't realize that the 'binary' in Postman is called 'File' in Pororoca, my fault. I just added the two entries to the BuildMappings list and everything works as expected.

To fix this, I will add application/dns-json and application/dns-message MIME types in the next release.

If you add this to the next release, it will be possible to do DoH queries with Pororoca. Thanks a lot!

alexandrehtrb commented 1 year ago

Fixed on release 2.1.0!