If you want to generate an action URL, I think you’ll want this API

String link = ERXRouteUrlUtils.actionUrlForEntity(context, entityName, 
entityID, action, format, queryParameters, secure, includeSessionID);



> On Apr 16, 2020, at 12:42 PM, Dev WO via Webobjects-dev 
> <webobjects-dev@lists.apple.com> wrote:
> 
> Hi everyone,
> 
> I’m currently trying a few things with ERRest.
> In a stateless component, I need to create some urls manually (they will be 
> used inside a script element).
> When I was calling my DirectAction class, I was just doing this:
> 
>      context().generateRelativeURLs();
> NSMutableDictionary<String, String> dict = new NSMutableDictionary<String, 
> String>();
> ...
> dict.put(key, value);
> ...
> String relativeUrl = context()._directActionURL(“myDirectAction", dict, 
> false);
> 
> 
> But I wasn’t able to find out the equivalent _directActionURL() method to 
> generate the Rest (with /ra) URL.
> 
> How would you manually generate a relative URL for an ERRest request?
> 
> Thanks a lot and stay safe,
> 
> Xavier
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
> 
> This email sent to jtay...@oeinc.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to