How to send Custom object a s parameter in Fiddler

3 posts, 0 answers
  1. Vishal
    Vishal avatar
    2 posts
    Member since:
    May 2014

    Posted 19 May 2014 Link to this post

    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. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 19 May 2014 Link to this post

    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.

     
  3. Vishal
    Vishal avatar
    2 posts
    Member since:
    May 2014

    Posted 19 May 2014 in reply to Eric Lawrence Link to this post

    Thanks Eric,

    That makes sense. :)
Back to Top