Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About web call setting problem #4

Open
wellxion opened this issue Aug 20, 2015 · 3 comments
Open

About web call setting problem #4

wellxion opened this issue Aug 20, 2015 · 3 comments

Comments

@wellxion
Copy link

When I setting url like this :
http://172.17.13.140:8080/web/P2PServer.jsp?cache_mode=false&action=search&txtInput_json={"test" : ""}
It will compile context fail

It Seems like general code cause some bug?

By the way, web call UI is not so friendly, it confused me at first use

@rdavisau
Copy link
Owner

Hi!

Are you able to share the output of http://172.17.13.140:8080/web/P2PServer.jsp?cache_mode=false&action=search&txtInput_json={"test" : ""}? It may be that the returned json has something in it that breaks the driver.

Otherwise, you might also try setting the URL to http://172.17.13.140:8080/web/P2PServer.jsp?cache_mode=false&action=search&txtInput_json={%22test%22%20:%20%22%22} (already url-encoded) as a quick test; in case there is some error in the URL handling itself.

Finally - if you have any suggestions or specific complaints about the UI, please share and I can look at improving 👍

@wellxion
Copy link
Author

First, it is break berfore trying to get request, linqpad return an error dialog:
image

I think the problem is driver generated code cause compile fail, look at code:

using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using System.Web;
using JsonDataContext;
using LINQPad.User.testInput;

namespace LINQPad.User {
 public class TypedDataContext : JsonDataContextBase {
        public IEnumerable<LINQPad.User.testInput.test> tests { get { return GetUrlParameterlessInput<LINQPad.User.testInput.test>(@"http://172.17.13.140:8080/web/P2PServer.jsp?cache_mode=false&action=search&txtInput_json={"test" : ""}", new List<Tuple<string,string>> { Tuple.Create("Accept","application/json; text/json") }); } }
}
}

namespace LINQPad.User.testInput
{
    public partial class test
    {
        [JsonProperty("error_code")]
        public double error_code { get; set; }
        [JsonProperty("error_msg")]
        public string error_msg { get; set; }
    }
}

Double quotes will break the string and cause it compile fail, I tried to change all quotes to single quotes to solve that problem yesterday.
And then, I will try url encode to test, but I think it is not a best solution.

Finally, The first confusing is web call UI doesn't have a edit button, it waste me lot of time to find the way to edit input settints.
And other suggestions is you can follow Postman UI design, like seperate Get and Post parameter setting, It maye be better.

By the way, I realy like method setting in web call, that a good idea. 😆

@rdavisau
Copy link
Owner

Thanks for the information -- I'll sort this out over the next day or two 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants