This is a migrated thread and some comments may be shown as answers.

Translate Postman format to Fiddler

7 Answers 1196 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Avram
Top achievements
Rank 1
Avram asked on 04 Mar 2020, 06:16 PM

My client's developer sent me a Postman Post Request Body in a format that I'm not sure how to enter into Fiddler 4.

In the Postman Body (raw):

{
              "userCredential":
              {
                             "userId": "myemail80@mailhost.com",
                             "password": "Password1"
              }
}

I copied just the UserId and password parts into the top part of Fiddler composer, and other values in the lower "Request Body" in Telerik:

userId: myemail80@mailhost.com
password: Password1

Do I need to encode "userCredential" and if so, how?

I am a bit confused between terminologies Request Body and Request Header between Postman and Telerik.

Testing using Postman I get a OK 200 return. In Fiddler I am getting 
"statusCode":1,"errorType":3,"errorCode":9200,"errorMessage":"Missing mandatory data in header"}}

Thanks,

 

7 Answers, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 05 Mar 2020, 03:11 PM

Hi Avram,

If the Authentication Schemes is Basic, then the username:password string combination would need to be base64 encoded and placed in the Authorization Header. Let me go over the steps to do this. 

1. Navigate to https://www.base64encode.org/

2. Paste in the myemail80@mailhost.com:Password1 combination and click the encode button. Ensure it is formatted exactly as the italicized text.

3. Copy the encoded value and add the Authorization Header as shown below.

Authorization: Basic bXllbWFpbDgwQG1haWxob3N0LmNvbTpQYXNzd29yZDE=

This format follows the RFC Standard and is generally the most widely used. If the Basic authentication scheme is not in use, let me know which one is and I can provide the steps.

Please let me know if you need any additional information. Thank you for using the Fiddler Forums.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Avram
Top achievements
Rank 1
answered on 05 Mar 2020, 10:16 PM

Eric:  Thank you for your response.  It's been a few years since I've worked with calling a REST API. It's slowly....very slowly, coming back. 

I did create an Authorization:Basic url64encoded and placed it before any of the other Request Body data. They are using Basic authentication.  Their API is returning:   
     No Proxy-Authorization Header is present.
     No Authorization Header is present.

and from their API:  ":"Missing mandatory data in header"}}

PS I found a url encoder inside Fiddler under Tools|TextWizard.

Thank you,

   Avram 

 

0
Avram
Top achievements
Rank 1
answered on 05 Mar 2020, 10:28 PM

Eric:  After more testing, and trying with Postman, I believe the client is NOT using RFC Standard authorization.

Hence, their "body" contains:

{                "userCredential":
                {  "userId": "myemail80@mailhost.com","password": "Password1"}
}

~ Avram


0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 05 Mar 2020, 10:49 PM

Hi Avram,

Be sure to use the To Base64 as shown in the below screenshot. This is not to be confused with the To Base64Url encoder as they are different. Can you confirm that you are using the Bas64 encoder?

Additionally, if they are using a custom authentication scheme. They would also need to provide you the expected request scheme and format. Note that a custom authentication scheme is not recommended because the RFC standards are widely accepted and secure.

Lastly, can you provide a screenshot of postman set up before submitting the request? Remember to scrub any sensitive information.

In the meantime, please let me know if you need any additional information. Thank you.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Avram
Top achievements
Rank 1
answered on 06 Mar 2020, 03:08 PM

Eric:

I compared the results of myemail80@, etc with your results and they were the same. I used that to generate the correct encoded login.  I'm trying to understand the userCredential syntax of what they provide me for use with Postman, and use that if possible with FIddler.  I've attached the screen shots. In Postman there are the "Headers" and "Body" tabs. The Body tab is where the Credentials are set.  I included the "Auth" to show that no Authorization is used.  So how "userCredentials" is passed to the API via Postman is ??  Thank you,  Avram.

 

 

0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 06 Mar 2020, 07:12 PM

Hi Avram,

Thank you for providing the screenshots of Postman. This authentication scheme appears to be custom since it isn't set in Postman. Can you confirm the Fiddler Request looks like the below screenshot?

Let me know if you have any additional questions. Thank you and I look forward to your reply.

Regards,


Eric R | Senior Technical Support Engineer
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Avram
Top achievements
Rank 1
answered on 10 Mar 2020, 06:43 PM

Eric: thanks for all you assistance.  I did have the Header and Body information in the wrong place.

Using your example and format for userCredential, the API is still returning an error.

I will take this up with the vendor and see if they can assist by looking to their API logs.

It does work fine using Postman!  Thanks for your help.

Tags
Fiddler Classic
Asked by
Avram
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Avram
Top achievements
Rank 1
Share this question
or