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

How to send Custom object a s parameter in Fiddler

2 Answers 148 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Vishal
Top achievements
Rank 1
Vishal asked on 19 May 2014, 10:56 AM
Hi,

I am fairly new to Fiddler and I am stuck in a issue.

I have a WCF service which has a Upload File Method which takes a Custom object

  [DataContract]
    public class UploadFile
    {
        [DataMember]
        public Stream fileStream { get; set; }
        
        [DataMember]
        public string serverName { get; set; }
        
        [DataMember]
        public string accessPoint { get; set; }

        [DataMember]
        public string resourcePath { get; set; }
    }

and this is the WCF method Definition

[WebInvoke(ResponseFormat = WebMessageFormat.Json, Method = "POST", UriTemplate = "FileName", BodyStyle = WebMessageBodyStyle.Bare)]
        [OperationContract]
        [FaultContract(typeof(Errors))]
        void FileUpload(UploadFile uploadFile);


How do i test this in fiddler?

Thanks

2 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 19 May 2014, 03:47 PM
Hi, Vishal--

That entirely depends on what you mean by "test this." 

Typically, you use Fiddler to capture (and potentially modify) traffic between a client and the server. In other cases, you might use the Composer tab to generate a new HTTP request directly and send it to the server, using Fiddler's Inspectors to analyze the server's response.

Perhaps you're asking: "What content do I need to add to the Composer tab to issue a request that matches the target API"-- Unfortunately, that's really a question about WCF and not about Fiddler. The simplest approach would be to simply generate a client which talks to this service and use Fiddler to capture its traffic. You can then drag/drop such a request from Fiddler's Web Sessions list to the Composer to clone it and optionally modify it before resending.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Vishal
Top achievements
Rank 1
answered on 20 May 2014, 04:56 AM
Thanks Eric,

That makes sense. :)
Tags
Windows
Asked by
Vishal
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Vishal
Top achievements
Rank 1
Share this question
or